I am taking a programming class at school, where I am required to use code blocks and C++, so I will not able to use anything else. My current situation is, that I have code blocks installed on my flash drive, so that I can run all my programs without having to install anything on the computer. Whenever I read a tutorial on how to get opengl working on your computer, there is always a part about copying dlls to your system32 folder or something like that. However, I do not have write access to every computer I will be using. I am fine with getting any add-on if that will help me with this, and conversely, I am fine with having the bare minimum to be able to start learning opengl. Also creating a bootable usb with linux then running it from there is not an option, as I am fairly confident my teacher does not want me getting root access to the computers, which Linux enables.
Asked
Active
Viewed 201 times
-1
-
normally you add the include files in the include folder for linux but bootable usb is probably not going to work very well because opengl requires drivers and gpu which might not work well with bootable flash, not going into specifics. – Irrational Person Dec 17 '14 at 22:14
1 Answers
0
You only need to copy DLLs like those for SDL or GLFW into system32 if you want to be super-lazy. Otherwise you can just copy them next to your executable and Windows will find them just fine:
If SafeDllSearchMode is enabled, the search order is as follows:
- The directory from which the application loaded.
- The system directory. Use the GetSystemDirectory function to get the path of this directory.
- The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
- The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
- The current directory.
- The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.
If SafeDllSearchMode is disabled, the search order is as follows:
- The directory from which the application loaded.
- The current directory.
- The system directory. Use the GetSystemDirectory function to get the path of this directory.
- The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
- The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
- The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.
A larger concern is ensuring that all the machines you want to run your OpenGL code on have a viable OpenGL ICD. Installing new drivers generally requires admin access.
If you can't install new drivers and you're willing to tolerate software rasterization and maxing out at OpenGL 3.3 you can build the Mesa opengl32.dll
and plop it next to your executable.