PDA

View Full Version : loading extensions, etc...



graphicsMan
05-01-2003, 09:50 AM
Hi all -

I'm having problems using the NVIDIA cloth demo (Cg Physics). Actually, the demo works just fine, but I'm trying to use the PBuffer class from the demo in one of my own test apps.

My program compiles just fine, but won't link because it can't find a whole bunch of symbols. I tried looking at which .lib files the Cg Physics demo uses, but they appear to use pretty much the same libs as me.

I think that it must be some kind of auto library loading of extensions that goes on, but I don't really know, and if it is, I certainly don't understand what IS going on.

A small smattering of the errors I get:

TexTest error LNK2019: unresolved external symbol _glh_init_extensions referenced in function "void __cdecl getExts(void)" (?getExts@@YAXXZ)
and
TexTest error LNK2019: unresolved external symbol _wglBindTexImageARB referenced in function "public: int __thiscall PBuffer::Bind(int)" (?Bind@PBuffer@@QAEHH@Z)

If anyone could help, I'd really appreciate it.

Thanks,
Brian

jwatte
05-01-2003, 09:55 AM
Try a support forum for your development tool.

Since it seems you're using MSVC, tools that may help you include doing a find-all-files for glh_init_extensions in the NVIDIA SDK where you got the class from, and using LINK /DUMP (or DUMPBIN) to see what libraries export what symbols.

Another way to look at it: you have one project that builds, and one that doesn't. Your task is to figure out the difference. This is very similar to debugging, and debugging is THE most valuable skill you can have as a programmer.

jra101
05-01-2003, 10:51 AM
Do you have this line:

#define GLH_EXT_SINGLE_FILE

in a single file that includes glh_extensions.h?

graphicsMan
05-01-2003, 12:27 PM
No. why? Does this change the linking process? I saw somewhere that in a preprocess, it changes the signitures of the functions, but I still couldn't find symbols for those either...

jra101
05-01-2003, 12:30 PM
Yes, that tells the glh extension headers to provide the GL extension functions to the .cpp file its included in so the linker can find them.