> $ clang++ -o test main.cpp template.cpp > >> /usr/bin/ld: /tmp/main-e2fa2c.o: in function `main': > main.cpp:(.text+0x2f): undefined reference to `Template<int>::Template()' > /usr/bin/ld: main.cpp:(.text+0x4d): undefined reference to > `Template<int>::~Template()' > /usr/bin/ld: main.cpp:(.text+0x82): undefined reference to > `Template<int>::~Template()' >
What happens if you change the order of the .cpp files, putting template.cpp first; is it stil unresolved? clang++ -o test template.cpp main.cpp
_______________________________________________ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users