This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld & my Makefile


Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> writes:

> I used g++ instead gcc -x c++. When i use -llibstdc++ at the end of link
> line , i receive following lines:

> /usr/bin/ld: cannot find -llibstdc++

It's -lstdc++.  But you don't need to specify it when using g++.  This
error is hiding the other errors--that is, because this error occurs,
the linker is not reporting the errors which appear when you omit that
option.


> urldump.o: In function `flushing(void*)':
> urldump.c:(.text+0xce): undefined reference to `flush_to_db(int)'

This function is not defined anywhere in your program.  It's
certainly not defined in libstdc++.  You may simple require some
extern "C" declarations, there is no way for us to know.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]