Newbie to Linux with linking problems... please help and point me to right direction!
Björn Brandenburg
bjoern@hvk-gymnasium.de
Wed Jun 12 14:22:00 GMT 2002
Hello everyone,
I have some experience developing in the Windows world and usually don't
have any problems (that I can't sovlve myself) programming in
C/C++/MFC/STL ...
Now I got myself a second computer and started migrating to Linux. I
wrote a little test app to try out emacs and gcc, nothing big or fancy,
but I ran into trouble I just don't know how to get out of.
Would you please explain to me what I'm doing wrong? The program
compiles just fine, but the linker complains about some references...
Here is what it says:
askadar@linuxkiste:~/programme/wortfinder> make
gcc -o wortfinder wortfinder.o wortbaum.o
wortbaum.o: In function
`__malloc_alloc_template<0>::_S_oom_malloc(unsigned int)
':
wortbaum.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x1a): undefined reference to `endl(ostream &)'
wortbaum.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x27): undefined reference to `cerr'
wortbaum.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x2c): undefined reference to `ostream::operator<<(char const *)'
wortbaum.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x37): undefined reference to
`ostream::operator<<(ostream&(*)(ostream &))'
collect2: ld returned 1 exit status
make: *** [wortfinder] Fehler 1
askadar@linuxkiste:~/programme/wortfinder>
Thank you very much for your help!
Björn Brandenburg
More information about the Gcc-help
mailing list