This is the mail archive of the
mailing list for the GCC project.
Re: ld & my Makefile
Mohsen Pahlevanzadeh <firstname.lastname@example.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
> 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.