Readme.txt 4.8 KB

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