User forums > Help
Templates and ld error
Michael:
--- Quote from: Ceniza on January 20, 2006, 04:35:12 am ---That bunch of -I must be the side effect of something already discussed in the forums, that mandrav decided to "fix".
--- End quote ---
I got the bunch of -I with my C::B compiled yesterday (rev1813).
In the two header files, I have found each time the inclusion of the same header files:
--- Quote ---#include <cassert>
#include <cstdlib>
--- End quote ---
This should be avoided.
Michael
Michael:
I got the code building fine with C::B/MinGW :). It also seems to work correctly.
I have applied the solution proposed by Ceniza and made peek() non-const. As told above, I have also commented the included files below from the MyStack.h and MyQueue.h:
--- Quote ---#include <cassert>
#include <cstdlib>
--- End quote ---
Those included files are not needed.
At the beginning, I got the same problems as davereid20. Then, I have tried to add to the linker option --allow-multiple-definition, make a clean and a build. It worked :). Then I have tried without --allow-multiple-definition and it worked too (before building, I have made a clean). It seems that just a clean was needed :).
Michael
Navigation
[0] Message Index
[*] Previous page
Go to full version