troublesome compiling error
ok, I started debuging my landscape renderer and got about 90 errors. ewwwww. now I''m down to 9. I think once I get this figured out it should compile ok. Here''s an example of one of my errors:
error C2601: ''GenerateLandscape'' : local function definitions are illegal
all the errors are like this and come from the same class. Actually, every function from that class has a coresponding error. I would greatly appreciate some help on what I might be doing wrong.
thanks,
Joe
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Can you give more details, such as the definitions and implementations for a few functions?
Dave
Dave
It sounds like you made a brace error. Check the braces on your functions to make sure that you aren''t including one function within another.
i.e. Nothing like:
void FuncA(void) {
//blah
void FuncB(void) {
//blah
}
}
i.e. Nothing like:
void FuncA(void) {
//blah
void FuncB(void) {
//blah
}
}
well, it''s a pretty standard class. The class is defined in cLandscape.h and the functions are in cLandscape.cpp. The includes are in cLandscape.h. I don''t really want to post all of the code here, I don''t think it would help any. I''m pretty sure the class isn''t the problem. What I suspect is the problem is how the files are included in my workspace. Basically what I''m asking is for some ideas on what could cause that error?
Thanks again,
Joe
p.s-I know the class is ok because it compiled fine before adding it to the workspace.
JoeMont001@aol.com www.polarisoft.n3.net
Thanks again,
Joe
p.s-I know the class is ok because it compiled fine before adding it to the workspace.
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
SiCrane, you might be right, I counted the brackets and counted 39. That means that there''s either one missing, there''s one extra, or I miss counted.
JoeMont001@aol.com www.polarisoft.n3.net
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
I think SiCrane is right.
Have you tried putting the cursor on the error and pressing F1? It might also help you solve those other errors...
Have you tried putting the cursor on the error and pressing F1? It might also help you solve those other errors...
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
ok, last error question regarding this topic, promise. what might be causing these errors?
main.obj : error LNK2005: "struct HWND__ * hWnd" (?hWnd@@3PAUHWND__@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "struct HGLRC__ * hRC" (?hRC@@3PAUHGLRC__@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "struct HDC__ * hDC" (?hDC@@3PAUHDC__@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "bool active" (?active@@3_NA) already defined in cGLFramework.obj
main.obj : error LNK2005: "bool done" (?done@@3_NA) already defined in cGLFramework.obj
main.obj : error LNK2005: "class cLandscape Landscape" (?Landscape@@3VcLandscape@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "bool * keys" (?keys@@3PA_NA) already defined in cGLFramework.obj
Debug/Landscape.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
Creating browse info file...
Landscape.exe - 8 error(s), 0 warning(s)
thanks,
Joe
JoeMont001@aol.com www.polarisoft.n3.net
main.obj : error LNK2005: "struct HWND__ * hWnd" (?hWnd@@3PAUHWND__@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "struct HGLRC__ * hRC" (?hRC@@3PAUHGLRC__@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "struct HDC__ * hDC" (?hDC@@3PAUHDC__@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "bool active" (?active@@3_NA) already defined in cGLFramework.obj
main.obj : error LNK2005: "bool done" (?done@@3_NA) already defined in cGLFramework.obj
main.obj : error LNK2005: "class cLandscape Landscape" (?Landscape@@3VcLandscape@@A) already defined in cGLFramework.obj
main.obj : error LNK2005: "bool * keys" (?keys@@3PA_NA) already defined in cGLFramework.obj
Debug/Landscape.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
Creating browse info file...
Landscape.exe - 8 error(s), 0 warning(s)
thanks,
Joe
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
I bet you are defining your variables multiple times.
It's just a guess, but:
- maybe you have defined variables in your .h file. Definitions should only be in .c or .cpp files. The .h files can use "extern" to make them "visible".
- maybe you just defined the same vars in both .c or cpp files?
Edited by - BasKuenen on November 5, 2000 9:05:17 PM
It's just a guess, but:
- maybe you have defined variables in your .h file. Definitions should only be in .c or .cpp files. The .h files can use "extern" to make them "visible".
- maybe you just defined the same vars in both .c or cpp files?
Edited by - BasKuenen on November 5, 2000 9:05:17 PM
you''re right again. I had the variabls defined in the header file instead of the .cpp file. It compiled for the first time. YAAAAAAAAAAAYYYYYYYYYY!
later,
Joe
JoeMont001@aol.com www.polarisoft.n3.net
later,
Joe
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement