Archived

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

HellRiZZer

HELP PLEASE!!!

Recommended Posts

HellRiZZer    308
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? "

Ionware Productions - Games and Game Tools Development

Share this post


Link to post
Share on other sites
dwarfsoft    1229
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

Share this post


Link to post
Share on other sites
Myopic Rhino    2315
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.

Share this post


Link to post
Share on other sites
Ecko    122
find out what library those are in then link them. A way to link that I like under windows is to use:


  
#pragma comment( lib, libname )


-----------------------------------------------------------
"People who usualy use the word pedantic usualy are pedantic!"-me

Share this post


Link to post
Share on other sites
Myopic Rhino    2315
quote:
Original post by Ecko
find out what library those are in
Ahem...
quote:
Original post by Myopic Rhino
there is no static library for Windows that contains the definitions of those functions.

Share this post


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


  
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.

Share this post


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

Share this post


Link to post
Share on other sites