Where to DrawGLScene?
I''m having a couple problems drawing onto the screen... or even getting the code to compile.
Right now, I have a main file, "world.cpp" and an Object "cube.cpp" file. The Cube.cpp file contains various things, including void drawCube(). I am trying to invoke this method from the world.cpp file, but have not been successfull.
I call the drawCube like:
world[j].drawCube();
Inside of: int DrawGLScene(GLvoid)
I get this compile error:
Linking...
world.obj : error LNK2001: unresolved external symbol "public: void __thiscall Cube::drawCube(void)" (?drawCube@Cube@@QAEXXZ)
What is causing this? Do I have to only draw things inside methods called DrawGLScene()? (This may sound like a dumb question, but my background is in Java, where paint() does pretty much all the work.)
The code compiles file, but when I attempt to "Build.exe" I get that error.
Please help!
A guess...
sounds like you have added the drawCube function defintion to your class definition, but not added the function code, forgot the cube:: or mispelled it.
in your cube.cpp there must be a
void Cube::drawCube()
{
.....
??
Edited by - claus hansen ries on June 15, 2000 6:16:51 AM
sounds like you have added the drawCube function defintion to your class definition, but not added the function code, forgot the cube:: or mispelled it.
in your cube.cpp there must be a
void Cube::drawCube()
{
.....
??
Edited by - claus hansen ries on June 15, 2000 6:16:51 AM
Ries
I have both the class declaration and the Cube::drawCube() methods there... And it''s called from the main file correctly... (I''m using VC++ 6.0, and it pops open a mini dialog and shows which methods are available for the object, and I selected from there.)
Anything else? =)
Anything else? =)
if your code is short try post it...or a link to it...??
world.cpp cube.h cube.cpp
in world.cpp you include cube.h, which contain class definition
and in cube.cpp the is the Cube::draw... ??
Edited by - Claus Hansen Ries on June 15, 2000 6:44:32 AM
world.cpp cube.h cube.cpp
in world.cpp you include cube.h, which contain class definition
and in cube.cpp the is the Cube::draw... ??
Edited by - Claus Hansen Ries on June 15, 2000 6:44:32 AM
Ries
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement