Archived

This topic is now archived and is closed to further replies.

xlnk

implicit declaration of function `int CreateGLWindow(...)'

Recommended Posts

xlnk    122
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.

Share this post


Link to post
Share on other sites
xlnk    122
this is the code for that part:


if (!CreateGLWindow("NeHe''s OpenGL Framework",640,480,16,fullscreen))
{
return 0; }

Share this post


Link to post
Share on other sites
Null and Void    1088
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:
  
/*
A generic prototype
*/
returnvalue Name(type, type, type);

/*
One for CreateGLWindow. Put this near the top of the source file.
*/

BOOL CreateGLWindow(char *, int, int, int, bool);


[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
xlnk    122
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.

Share this post


Link to post
Share on other sites
Null and Void    1088
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!]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
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..."

Share this post


Link to post
Share on other sites
xlnk    122
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?

Share this post


Link to post
Share on other sites