implicit declaration of function `int CreateGLWindow(...)'
I typed up NeHe''s tutorial 1, and when i compile I get this error
implicit declaration of function `int CreateGLWindow(...)''
i included
but it still doesnt work.
Is CreateGLWindow in another file? If so, you need to have some type of extern declaration. Is CreateGLWindow below the function calling it in the source files? If so, you need to put a prototype for it above the current function.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
this is the code for that part:
if (!CreateGLWindow("NeHe''s OpenGL Framework",640,480,16,fullscreen))
{
return 0; }
if (!CreateGLWindow("NeHe''s OpenGL Framework",640,480,16,fullscreen))
{
return 0; }
Are you sure you should be doing OpenGL if you don''t know enough C/C++ to do that on your own? I''ll help you anyway though:
[Resist Windows XP''s Invasive Production Activation Technology!]
|
[Resist Windows XP''s Invasive Production Activation Technology!]
heh, i''m pretty sure i know My C++, heh, anyways, thanks
but now i get this linker error message
d:\programming\projects\opengl\template.o(.text+0xb46):template.cpp: undefined reference to `CreateGLWindow(char *, int, int, int, bool)''
I also have these .libs attached:
-lopengl32 -lglu32 -lglut32 -lgdi32 -luser32 -lglaux
I tryed #define CreateGLWindow, but didnt work.
but now i get this linker error message
d:\programming\projects\opengl\template.o(.text+0xb46):template.cpp: undefined reference to `CreateGLWindow(char *, int, int, int, bool)''
I also have these .libs attached:
-lopengl32 -lglu32 -lglut32 -lgdi32 -luser32 -lglaux
I tryed #define CreateGLWindow, but didnt work.
You''re not linking a required file. Is CreateGLWindow in your file? It''s NOT a standard function. If it''s in another file you need to link it also. If you don''t have the file it''s in, you need to write your own or not use it. Those are the easiest situations I can think of, did you simply download one of NeHe''s tutorials?
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
December 15, 2001 10:17 PM
quote:
Original post by xlnk
heh, i''m pretty sure i know My C++, heh, anyways, thanks
[...]
I tryed #define CreateGLWindow, but didnt work.
I''m pretty sure you don''t.

Repeat after me: "One step at a time...one step at a time..."
umm....i got it to compile, thx, but now ive run into another problem, when i run the program, if i select windowed mode, you can see a program down in the task bar, but you cant see the program on your desktop, if i run the mouse over the part of the screen where the window is supposed to be (top left) my mouse icon shows its loading, So its there, but its not, same with fullscreen. Do you know what my problem might be?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement