Skip to main content
gamedev.net
🔒 Locked

DLL paths...

Started by MaulingMonkey Mar 4, 2003 at 10:43 PM 2 replies 350+ views
Original Post
MaulingMonkey
MaulingMonkey
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!
SiCrane
SiCrane
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.
MaulingMonkey
MaulingMonkey
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 .
S1CA
S1CA
Windows will also look for the DLL in the same folder as the .exe file... so just put the DLL next to the .exe!

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.