user1496491
user1496491

Reputation: 583

How to install freeglut without placing the .dll in system folders?

I'm looking for a way to install freeglut properly. EVERYWHERE I looked so far recommended to put .dll in system folders. But I don't want to. I want my project to be potable, I want to be able to send my project to other pc and keep working on my project on it, without installing freeglut on other machine. I want to keep all my sources in one place. How can I do that? I mean, it should be possible, right?

Upvotes: 0

Views: 424

Answers (1)

BDL
BDL

Reputation: 22157

In windows, there are several places where you can place the dynamic libraries for an application. The are always searched in the same order until a dll with the specific name is found. In general, the following directories are searched:

  1. The directory from which the application loaded.
  2. The system directory.
  3. The 16-bit system directory
  4. The Windows directory.
  5. The current directory.
  6. The directories that are listed in the PATH environment variable.

See the Dynamic-Link Library Search Order article for more details.

If you want to keep your application portable, you can simply copy the dll to the directory where your application is stored since this folder gets visited first anyway.

Upvotes: 2

Related Questions