C/C++ undefinded symbol problem

M

Mount Everist

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_MPEG

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_mpeg.c to fame_decoder_core.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_MPEG4_CORE(profile)->FAME_OVERLOADED(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_CONSTRUCTOR(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
 
J

Jonathan Mcdougall

Mount Everist wrote:

With the kind of code you provide, I can only make a wild guess.
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

What's FAME_DECODER_MPEG ?
Anyway, the error is being thrown at the following line, where my core profile
is being initialised:

FAME_PROFILE_MPEG4_CORE(profile)->FAME_OVERLOADED(init)(profile,context,params,buffer,size);

What's FAME_PROFILE_MPEG4_CORE ?
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_CONSTRUCTOR(t) t * t ## _constructor(t *this)
#define FAME_DELETE(x) free(x)
#define FAME_OVERLOADED(x) super_ ## x

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


Jonathan
 
M

Mount Everist

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_MPEG insead of FAME_DECODER_CORE). 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:
 
J

Jonathan Mcdougall

During visiting hours Jonathan Mcdougall said:
Please, don't top-post.
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top