Mail Archives: djgpp/1997/04/11/03:12:10
>You will find some code at: http://www.hcst.com/~bryan/univtmpl.zip
>that will not compile. I have some problem with my Templates, and I can't
>figure out whats wrong. I included the makefile and everything, so just
>unzip it, and run make, and you'll get all the error messages.
1. Get rid of `;' after closing braces `}' in constructs
like `while (cond) { do_smth; };'
^ This is not needed.
2. When you get undefined reference to OBJECT::member_function in ...
move definition of member_function from header which declares OBJECT
to apropriate .cc file (it will prevent inlining, though).
Recompile and you should get one more undefined reference (now definition
is just absent). Again, place definition to .cc file.
Now it should build happily (I didn't run resulting exes, though).
If it does not build now, then I obviously forget something.
Note that if you put -Wall in CFLAGS, you'll get a lot of warnings.
BTW, place some dependency information in makefile before recompilation
or remove object files, or it won't recompile your changes.
- Raw text -