Wes Biggs wrote:
> 
> optima wrote:
> 
> > cc -G NativeHello.c NativeHelloImp.c  -o libHello.so
> >      ,I encount a problum
> > "cc: unrecognized option `-G'
> > /usr/lib/crt1.o(.text+0x36): undefined reference to `main'"

The problem is that there is no "-G" option to gcc. If you want to build
with debugging symbols, use the "-g" flag. Also add -shared and
-rdynamic to the command line to build a proper shared library. 

/usr/lib/crt1.o is part of gcc.


-- 
Jeff Galyan
http://www.anamorphic.com
http://www.sun.com
jeffrey dot galyan at sun dot com
talisman at anamorphic dot com
Sun Certified Java(TM) Programmer
======================================================================
Linus Torvalds on Microsoft and software development:
"... if it's a hobby for me and a job for you, why are you doing such a
shoddy job of it?"

The views expressed herein do not necessarily reflect those of my
employer.

Sun Microsystems, Inc., has no connection to my involvement with the
Mozilla Organization.


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to