Archived

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

MaulingMonkey

DLL paths...

Recommended Posts

I''m doing programming at BCC computer lab (Bellevue Community Colledge...Washigton...yeah...). I''m faced with a dilema: they don''t want to install glut. Now, we all get 100 megs on H:, so what I''ve been doing is linking the .lib file from there (as well as including the .h file). The only remaining problem is the glut32.dll. Now, I can copy it into the same folder as every program I''m working on...but that''s rather wastefull, no? And no, I can not place it into the system directory...tried allready . So what I''m wondering is: how can I make the program find glut32.dll when it''s in h:\glut\glut32.dll? some sort of function or VC++ .Net thing? Help much appreciated...thanks!

Share this post


Link to post
Share on other sites
When trying to load a dll, the system will eventually look in all the directories specified in the PATH environment variable. So if you change the PATH variable before starting your program it should load the dll.

Share this post


Link to post
Share on other sites
What I really wanted was an in-program thing so I don''t have to navigate the console and manually set path or anything...

I found a soulution soon after I posted this (figures):

Right clicking on the project,
goto properties,
add to the ''Delay Loaded DLLs'' field ''glut32.dll''

first function in main (or at least first function before any glut api calls):

LoadLibrary("H:\\GLUT\\GLUT32.DLL");

note: must include windows.h

thanks for the suggestion though .

Share this post


Link to post
Share on other sites