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] | |
I tried to use a simple template in a class, and it worked when all the definition where in the same file. But when I separated the code in two cpp files, I get a linker error, and I couldn't firgure out how to compile it. I tried the following commands: g++ -c test.cpp g++ -c test1.cpp g++ -o test test.o test1.o The first two worked, but i got the linker error at the last one. I attached the files to these mail. Thank you. __________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de
Attachment:
test.cpp
Description: test.cpp
Attachment:
test.h
Description: test.h
Attachment:
test1.cpp
Description: test1.cpp
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |