[EMAIL PROTECTED] writes:

> g++ -m32 -O3 -Wall -Wno-deprecated -fPIC -pthread -g $(INCDIR) -o
> <executable file> -L<library directories>  -lmylib -lsystemclib1
> -lsystemclib2
>
> mylib is not getting linked.

Yes it is.

> I am getting undefined reference to
> sc_main which is defined in mylib.

It also matters where sc_main is referenced from. 

If it is referenced from libsystemc*, then your order of the
libraries is incorrect, or rather, you should probably have some
object files on your link line. Generally, link lines that contain
only libraries and no '-u' arguments are probably wrong.

Further explanations here:
 http://webpages.charter.net/ppluzhnikov/linker.html

> Could some one please help me in getting this issue resolved.

You may also wish to read this:
http://www.catb.org/~esr/faqs/smart-questions.html

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
Help-gplusplus mailing list
Help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to