C/C++ undefinded symbol problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mount Everist

    #1

    C/C++ undefinded symbol problem

    Hey,

    I'm just wondering if anyone ever ran into this error while changing someone
    elses code:

    error while loading shared libraries: libfame.so.1: undefined symbol:
    FAME_DECODER_MP EG

    To put this in context, I have the source code for an mpeg4 encoder. I have
    been trying to add functionality for a new profile. this has made it necessary
    to copy a lot of code before changing it. Before getting this error I copied
    fame_decoder_mp eg.c to fame_decoder_co re.c and updated everything so it was
    appears in the exact same way as the original class (the c file is really a
    c++ class, created using structs).

    Anyway, the error is being thrown at the following line, where my core profile
    is being initialised:

    FAME_PROFILE_MP EG4_CORE(profil e)->FAME_OVERLOADE D(init)(profile ,context,params ,buffer,size);

    FAME_OVERLOADED is defined in fame.h:

    /* object management */
    #define FAME_EXTENDS(t) t super
    #define FAME_NEW(t) t ## _constructor((t *) malloc(sizeof(t )))
    #define FAME_CONSTRUCTO R(t) t * t ## _constructor(t *this)
    #define FAME_DELETE(x) free(x)
    #define FAME_OVERLOADED (x) super_ ## x

    I don't really understand the above code though (a pointer(sry) to a tutorial
    would
    be great!).

    Any help is greatly apreciated,
    Cheers,
    Brendan
    --
    "Anyone who abandons what is done for what aught to be done
    learns his ruin rather than his preservation"


  • Jonathan Mcdougall

    #2
    Re: C/C++ undefinded symbol problem

    Mount Everist wrote:

    With the kind of code you provide, I can only make a wild guess.
    [color=blue]
    > I'm just wondering if anyone ever ran into this error while changing someone
    > elses code:
    >
    > error while loading shared libraries: libfame.so.1: undefined symbol:
    > FAME_DECODER_MP EG[/color]

    What's FAME_DECODER_MP EG ?
    <snip>
    [color=blue]
    > Anyway, the error is being thrown at the following line, where my core profile
    > is being initialised:
    >
    > FAME_PROFILE_MP EG4_CORE(profil e)->FAME_OVERLOADE D(init)(profile ,context,params ,buffer,size);[/color]

    What's FAME_PROFILE_MP EG4_CORE ?
    [color=blue]
    > FAME_OVERLOADED is defined in fame.h:
    >
    > /* object management */
    > #define FAME_EXTENDS(t) t super
    > #define FAME_NEW(t) t ## _constructor((t *) malloc(sizeof(t )))
    > #define FAME_CONSTRUCTO R(t) t * t ## _constructor(t *this)
    > #define FAME_DELETE(x) free(x)
    > #define FAME_OVERLOADED (x) super_ ## x[/color]

    Provide more code and we'll be able to help you.


    Jonathan

    Comment

    • Mount Everist

      #3
      Re: C/C++ undefinded symbol problem

      Actually, I was hoping for more of a pointer to what could be causeing that
      error in an app. I don't expect you to know anything about the code I'm using.

      Anyway, I fixed the problem - it turned out I was using the wrong object name
      (FAME_DECODER_M PEG insead of FAME_DECODER_CO RE). Sounds simple, but I'm
      dealing with a lot of code here.

      Thanks for the follow up though. now I'm gonna try and find a way to stop my
      email appearing in the cache-post-path!

      Cheers,
      Keno


      During visiting hours Jonathan Mcdougall said:[color=blue]
      > Mount Everist wrote:
      >
      > With the kind of code you provide, I can only make a wild guess.
      >[color=green]
      >> I'm just wondering if anyone ever ran into this error while changing someone
      >> elses code:
      >>
      >> error while loading shared libraries: libfame.so.1: undefined symbol:
      >> FAME_DECODER_MP EG[/color]
      >
      > What's FAME_DECODER_MP EG ?
      ><snip>
      >[color=green]
      >> Anyway, the error is being thrown at the following line, where my core profile
      >> is being initialised:
      >>
      >> FAME_PROFILE_MP EG4_CORE(profil e)->FAME_OVERLOADE D(init)(profile ,context,params ,buffer,size);[/color]
      >
      > What's FAME_PROFILE_MP EG4_CORE ?
      >[color=green]
      >> FAME_OVERLOADED is defined in fame.h:
      >>
      >> /* object management */
      >> #define FAME_EXTENDS(t) t super
      >> #define FAME_NEW(t) t ## _constructor((t *) malloc(sizeof(t )))
      >> #define FAME_CONSTRUCTO R(t) t * t ## _constructor(t *this)
      >> #define FAME_DELETE(x) free(x)
      >> #define FAME_OVERLOADED (x) super_ ## x[/color]
      >
      > Provide more code and we'll be able to help you.
      >
      >
      > Jonathan[/color]


      --
      "Anyone who abandons what is done for what aught to be done
      learns his ruin rather than his preservation"


      Comment

      • Jonathan Mcdougall

        #4
        Re: C/C++ undefinded symbol problem

        > During visiting hours Jonathan Mcdougall said:[color=blue]
        >[color=green]
        >>Mount Everist wrote:
        >>
        >>With the kind of code you provide, I can only make a wild guess.
        >>
        >>[color=darkred]
        >>>I'm just wondering if anyone ever ran into this error while changing someone
        >>>elses code:
        >>>
        >>>error while loading shared libraries: libfame.so.1: undefined symbol:
        >>>FAME_DECODER _MPEG[/color]
        >>
        >>What's FAME_DECODER_MP EG ?
        >><snip>
        >>[/color][/color]

        Please, don't top-post.
        [color=blue]
        > Actually, I was hoping for more of a pointer to what could be[/color]
        causeing > that error in an app. I don't expect you to know anything
        about the[color=blue]
        > code I'm using.[/color]

        So please include a complete "working" example of what your problem is.
        You cannot expect receiving some help if we cannot determine what's
        going on in your program.


        Jonathan

        Comment

        Working...