|
| 1 | +freeglut 2.8.1-1.mp for MSVC |
| 2 | + |
| 3 | +This package contains freeglut import libraries, headers, and Windows DLLs. |
| 4 | +These allow 32 and 64 bit GLUT applications to be compiled on Windows using |
| 5 | +Microsoft Visual C++. |
| 6 | + |
| 7 | +For more information on freeglut, visit http://freeglut.sourceforge.net/. |
| 8 | + |
| 9 | + |
| 10 | +Installation |
| 11 | + |
| 12 | +Create a folder on your PC which is readable by all users, for example |
| 13 | +�C:\Program Files\Common Files\MSVC\freeglut\� on a typical Windows system. Copy |
| 14 | +the �lib\� and �include\� folders from this zip archive to that location. |
| 15 | + |
| 16 | +The appropriate freeglut DLL can either be placed in the same folder as your |
| 17 | +application, or can be installed in a system-wide folder which appears in your |
| 18 | +%PATH% environment variable. Be careful not to mix the 32 bit DLL up with the 64 |
| 19 | +bit DLL, as they are not interchangeable. |
| 20 | + |
| 21 | + |
| 22 | +Compiling 32 bit Applications |
| 23 | + |
| 24 | +To create a 32 bit freeglut application, create a new Win32 C++ project in MSVC. |
| 25 | +From the �Win32 Application Wizard�, choose a �Windows application�, check the |
| 26 | +�Empty project� box, and submit. |
| 27 | + |
| 28 | +You�ll now need to configure the compiler and linker settings. Open up the |
| 29 | +project properties, and select �All Configurations� (this is necessary to ensure |
| 30 | +our changes are applied for both debug and release builds). Open up the |
| 31 | +�general� section under �C/C++�, and configure the �include\� folder you created |
| 32 | +above as an �Additional Include Directory�. If you have more than one GLUT |
| 33 | +package which contains a �glut.h� file, it�s important to ensure that the |
| 34 | +freeglut include folder appears above all other GLUT include folders. |
| 35 | + |
| 36 | +Now open up the �general� section under �Linker�, and configure the �lib\� |
| 37 | +folder you created above as an �Additional Library Directory�. A freeglut |
| 38 | +application depends on the import libraries �freeglut.lib� and �opengl32.lib�, |
| 39 | +which can be configured under the �Input� section. However, it shouldn�t be |
| 40 | +necessary to explicitly state these dependencies, since the freeglut headers |
| 41 | +handle this for you. Now open the �Advanced� section, and enter �mainCRTStartup� |
| 42 | +as the �Entry Point� for your application. This is necessary because GLUT |
| 43 | +applications use �main� as the application entry point, not �WinMain��without it |
| 44 | +you�ll get an undefined reference when you try to link your application. |
| 45 | + |
| 46 | +That�s all of your project properties configured, so you can now add source |
| 47 | +files to your project and build the application. If you want your application to |
| 48 | +be compatible with GLUT, you should �#include <GL/glut.h>�. If you want to use |
| 49 | +freeglut specific extensions, you should �#include <GL/freeglut.h>� instead. |
| 50 | + |
| 51 | +Don�t forget to either include the freeglut DLL when distributing applications, |
| 52 | +or provide your users with some method of obtaining it if they don�t already |
| 53 | +have it! |
| 54 | + |
| 55 | + |
| 56 | +Compiling 64 bit Applications |
| 57 | + |
| 58 | +Building 64 bit applications is almost identical to building 32 bit applications. |
| 59 | +When you use the configuration manager to add the x64 platform, it�s easiest to |
| 60 | +copy the settings from the Win32 platform. If you do so, it�s then only necessary |
| 61 | +to change the �Additional Library Directories� configuration so that it |
| 62 | +references the directory containing the 64 bit import library rather |
| 63 | +than the 32 bit one. |
| 64 | + |
| 65 | + |
| 66 | +Problems? |
| 67 | + |
| 68 | +If you have problems using this package (compiler / linker errors etc.), please |
| 69 | +check that you have followed all of the steps in this readme file correctly. |
| 70 | +Almost all of the problems which are reported with these packages are due to |
| 71 | +missing a step or not doing it correctly, for example trying to build a 32 bit |
| 72 | +app against the 64 bit import library. If you have followed all of the steps |
| 73 | +correctly but your application still fails to build, try building a very simple |
| 74 | +but functional program (the example at |
| 75 | +http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ works fine |
| 76 | +with MSVC). A lot of people try to build very complex applications after |
| 77 | +installing these packages, and often the error is with the application code or |
| 78 | +other library dependencies rather than freeglut. |
| 79 | + |
| 80 | +If you still can�t get it working after trying to compile a simple application, |
| 81 | +then please get in touch via http://www.transmissionzero.co.uk/contact/, |
| 82 | +providing as much detail as you can. Please don�t complain to the freeglut guys |
| 83 | +unless you�re sure it�s a freeglut bug, and have reproduced the issue after |
| 84 | +compiling freeglut from the latest SVN version�if that�s still the case, I�m sure |
| 85 | +they would appreciate a bug report or a patch. |
| 86 | + |
| 87 | + |
| 88 | +Changelog |
| 89 | + |
| 90 | +2013�05�11: Release 2.8.1-1.mp |
| 91 | + |
| 92 | + � First 2.8.1 MSVC release. I�ve built the package using Visual Studio 2012, |
| 93 | + and the only change I�ve made is to the DLL version resource�I�ve changed |
| 94 | + the description so that my MinGW and MSVC builds are distinguishable from |
| 95 | + each other (and other builds) using Windows Explorer. |
| 96 | + |
| 97 | + |
| 98 | +Martin Payne |
| 99 | +2013�05�11 |
| 100 | + |
| 101 | +http://www.transmissionzero.co.uk/ |
0 commit comments