Hmm... My third qhestion of the night.
I am trying to make my program lake less time to compile, so i made my program modular (.o files), and made a makefile to only compile what is needed.
Here is the deal (greatly simplified):
main.cpp
file2.cppCode:#include "file2.h" #include "file3.h" #include "file4.h"
file3.cppCode:#include "file2.h" class stuff;
file4.cppCode:#include "file3.h" class morejunk;
And all the .h files hold the prototypes for their namesake.cpp files.Code:#include "file4.h" class evenmorejunk;
Now, the makefile has this: (simplified, again)
makefile
Now, the linker is giving me errors telling me:Code:junk : main.o file2.o file3.o file4.o g++ -o junk main.o file2.o file2.o file4.o file2.o : file2.cpp file2.h g++ -c file2.cpp file3.o : file3.cpp file3.h g++ -c file3.cpp file4.o : file4.cpp file4.h g++ -c file4.cpp
These are the elements of a struct that is defined in a separate source file, andCode:nemoserv.cpp:27: storage size of `log' isn't known nemoserv.cpp:30: storage size of `opts' isn't known nemoserv.cpp:49: storage size of `chman' isn't known nemoserv.cpp:50: storage size of `cmd' isn't known
This class is defined also in another source file.Code:nemoserv.cpp:277: aggregate `rawMsg message' has incomplete type and cannot be initialized
Please tell me what I am doing wrong, or if you need more information (and what)
Thanks!
~EtherealFlaim
[/CODE]



LinkBack URL
About LinkBacks



