This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc/ g++ Linking Issues
- From: "Johnsy George" <johnsy at spsoftindia dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Wed, 7 Jan 2004 01:02:15 +0530
- Subject: gcc/ g++ Linking Issues
Hi,
I'm having a problem while linking a dynamic library which was created using
gcc
with a .cpp file using the g++ compiler.Each time I link I get an error of
undefined symbols.
Here is the command :
For creating dynamic library I use:
gcc helloworld.c -dynamic helloworld
#this creates a helloworld dynamic library.
Here's the command to link:
g++ hello.cpp -lhelloworld
error : undefined symbol printhello
Here helloworld is a library in which a function called printhello() is
implemented which is
used by hello.cpp.
Please let me know if you have any suggesstions.
johnsy