mags
July 31st, 2005, 11:52 AM
Im trying to make a simple wrapper class for the BOB structure from Tricks of the Windows Programming Gurus but Im having difficulties getting it to compile.
I have 3 files from the book and 2 files for my class. I can compile the 3 files from the book together fine, the problem arises when I try to compile my code with it. My compiler is flagging t3dlib1.h as the problem though even though it compiles with the other 2 files from the book fine without my 2 files.
My setup:
files from book->t3dlib1.h t3dlib1.cpp main.cpp
t3dlib1.h has all the header info,obviously hehe, and alot of externs at the end. T3dlib1.h contains no #includes. main.cpp has all the global directX7 objects and Im guessing from my limited usage of externs that the keyword is allowing this file to "see" the global objects.
t3dlib1.cpp has nothing out of the ordinary, it contains includes for t3dlib1.h and all the windows/directx/math headers.
main.cpp is where all the action is. DirectX is initialized here, has all the calback windows stuff, and has the game loop for my application. Main.cpp contains all the same includes as t2dlib1.cpp.
My files:
BaseSprite.h includes t3dlib1.h to get access to the structures defined there, without it <the include> t3dlib1.h compiles fine but basesprite.h is flagged for "identity not found" on structures that are defined in t3dlib1.h.
I hope Ive given enough information on my problem without being too overly confusing :P Im attaching all my source files aswell since they are pretty small in size.
I have 3 files from the book and 2 files for my class. I can compile the 3 files from the book together fine, the problem arises when I try to compile my code with it. My compiler is flagging t3dlib1.h as the problem though even though it compiles with the other 2 files from the book fine without my 2 files.
My setup:
files from book->t3dlib1.h t3dlib1.cpp main.cpp
t3dlib1.h has all the header info,obviously hehe, and alot of externs at the end. T3dlib1.h contains no #includes. main.cpp has all the global directX7 objects and Im guessing from my limited usage of externs that the keyword is allowing this file to "see" the global objects.
t3dlib1.cpp has nothing out of the ordinary, it contains includes for t3dlib1.h and all the windows/directx/math headers.
main.cpp is where all the action is. DirectX is initialized here, has all the calback windows stuff, and has the game loop for my application. Main.cpp contains all the same includes as t2dlib1.cpp.
My files:
BaseSprite.h includes t3dlib1.h to get access to the structures defined there, without it <the include> t3dlib1.h compiles fine but basesprite.h is flagged for "identity not found" on structures that are defined in t3dlib1.h.
I hope Ive given enough information on my problem without being too overly confusing :P Im attaching all my source files aswell since they are pretty small in size.