HELP PLEASE!!!
I don''t know how to get rid of those errors:
Main.obj : error LNK2001: unresolved external symbol "void (__stdcall* glMultiTexCoord2fARB)(unsigned int,float,float)" (?glMultiTexCoord2fARB@@3P6GXIMM@ZA)
Main.obj : error LNK2001: unresolved external symbol "void (__stdcall* glActiveTextureARB)(unsigned int)" (?glActiveTextureARB@@3P6GXI@ZA)
Main.obj : error LNK2001: unresolved external symbol "void (__stdcall* glClientActiveTextureARB)(unsigned int)" (?glClientActiveTextureARB@@3P6GXI@ZA)
Though I got glext.h, glxext.h and other files from OpenGL SDK, but it just doesn''t want to work!
Please help.
Thanks.
" Do we need us? "
You need to go into project settings and under "libraries" link in the OGL libraries that you want to use...
What compiler are you using? What environment? You might also want to add the directory of the library files into your directory listing...
-Chris Bennett of Dwarfsoft - The future of RPGs GPA Thanks to all the goblins in the GDCorner niche
What compiler are you using? What environment? You might also want to add the directory of the library files into your directory listing...
-Chris Bennett of Dwarfsoft - The future of RPGs GPA Thanks to all the goblins in the GDCorner niche
Actually, dwarfie, in this case, that won''t help, since there is no static library for Windows that contains the definitions of those functions.
HellRiZZer: Multitexturing has to be used as an extension on Windows. To use those functions, you have to get pointers to them using wglGetProcAddress.
Actually, I''m just guessing that you''re using Windows because those errors look like MSVC output. The fact that you mentioned glxext.h is throwing me off, though, since that''s the extension header for X Windows.
HellRiZZer: Multitexturing has to be used as an extension on Windows. To use those functions, you have to get pointers to them using wglGetProcAddress.
Actually, I''m just guessing that you''re using Windows because those errors look like MSVC output. The fact that you mentioned glxext.h is throwing me off, though, since that''s the extension header for X Windows.
find out what library those are in then link them. A way to link that I like under windows is to use:
-----------------------------------------------------------
"People who usualy use the word pedantic usualy are pedantic!"-me
#pragma comment( lib, libname )
-----------------------------------------------------------
"People who usualy use the word pedantic usualy are pedantic!"-me
quote:Original post by EckoAhem...
find out what library those are in
quote:Original post by Myopic Rhino
there is no static library for Windows that contains the definitions of those functions.
Ok, I''ll go into a bit more depth on what Myopic Rhino said. Those other people that insist that those functions are in libaries, please shut up and be quiet.
Firstly, you need to define pointers to those functions, I''m only going to do this for one function. This would be in one of your header files somewhere.
Then, in one of your source files, you actually declare the pointer, like so:
Now you have a null pointer to a function. To set this pointer to it''s correct value, you use wglGetProcAddress ( after you have checked for extension availability of course ):
You can then use glActiveTextureARB as you would any other function. If you forget to declaire the function pointers in the source file then you will get linker errors.
Death of one is a tragedy, death of a million is just a statistic.
Firstly, you need to define pointers to those functions, I''m only going to do this for one function. This would be in one of your header files somewhere.
typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
Then, in one of your source files, you actually declare the pointer, like so:
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
Now you have a null pointer to a function. To set this pointer to it''s correct value, you use wglGetProcAddress ( after you have checked for extension availability of course ):
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress( "glActiveTextureARB" );
You can then use glActiveTextureARB as you would any other function. If you forget to declaire the function pointers in the source file then you will get linker errors.
Death of one is a tragedy, death of a million is just a statistic.
Though in OpenGL SDK they use them without any declarations (extern , PFN* etc), and I want to use them in same way as they do. I use VC++6.0, have OpenGL SDK (latest I could get from their website).
Thanks all for replies.
" Do we need us? "
Thanks all for replies.
" Do we need us? "
Yeah, I make my own extension header. I only use the 1.1 gl header, the rest I code myself.
Death of one is a tragedy, death of a million is just a statistic.
Death of one is a tragedy, death of a million is just a statistic.
quote:Original post by HellRiZZer
Though in OpenGL SDK they use them without any declarations (extern , PFN* etc), and I want to use them in same way as they do. I use VC++6.0, have OpenGL SDK (latest I could get from their website).
That''s because Microsoft doesn''t give a damn about OpenGL and has not updated its libraries since... what, 1.0 ? 1.1 ?
[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]
Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement