User forums > General (but related to Code::Blocks)
How can I install glut in clodeblocks 64 bit with mingw?
cola:
https://www.transmissionzero.co.uk/files/software/development/GLUT/freeglut-MinGW.zip , downloading this worked with mingw 32 bit.
cola:
I have tried to install from source code of freeglut-3.2.1. I have run CMake (cmake-gui). I have selected mingw-makefile from cmake-gui. Clicked configure twice, configure is done, then clicked generate, generate is done. From a CMD command line window, from the directory where cmake made makefile and it is freeglut-3.2.1\build, I ran mingw32-make. Then I got some errors.
--- Code: ---error: subscripted value is neither array nor pointer nor vector
155 | if (pRawInput->data.hid.bRawData[0] ==
CMakeFiles\freeglut.dir\build.make:543: recipe for target 'CMakeFiles/freeglut.dir/src/mswin/fg_spaceball_mswin.c.obj' failed
mingw32-make[2]: *** [CMakeFiles/freeglut.dir/src/mswin/fg_spaceball_mswin.c.obj] Error 1
CMakeFiles\Makefile2:170: recipe for target 'CMakeFiles/freeglut.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/freeglut.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
--- End code ---
What will I do?
Miguel Gimenez:
The compilation of the library is out of the scope of this forum. Can you check if the libraries have been already created?. The error may be in the compilation of a sample. You should see two .a files in the lib folder and a file called freeglut.dll in the bin folder.
stahta01:
Does anyone have reason to believe freeglut can be compiled with an 64 bit version of MinGW GCC?
If yes, please state why you believe this.
Edit: I found that the MSys2 MINGW 64 bit version exists.
But, it uses this patch.
--- Code: ------ a/CMakeLists.txt 2019-09-25 23:43:34.000000000 +0300
+++ b/CMakeLists.txt 2019-09-30 21:10:08.047600000 +0300
@@ -67,16 +67,12 @@
SET(FREEGLUT_HEADERS
+ include/GL/glut.h
include/GL/freeglut.h
include/GL/freeglut_ucall.h
include/GL/freeglut_ext.h
include/GL/freeglut_std.h
)
-IF(FREEGLUT_REPLACE_GLUT)
- LIST(APPEND FREEGLUT_HEADERS
- include/GL/glut.h
- )
-ENDIF()
SET(FREEGLUT_SRCS
${FREEGLUT_HEADERS}
src/fg_callbacks.c
--- End code ---
It may or may not be related to the OP build problem.
Tim S.
gd_on:
I commonly use freeglut 3.2.1 compiled in 64 bits. I have made no patches. I have followed some instructions in https://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ where you can find freeglut dlls for 32 and 64 bits. But I also built a cbp file attached here and placed directly in my freeglut-3.2.1 folder (with src, include, ... subfolders), of course adapted to my installation, but should work without many modifications.
If that can help.
Navigation
[0] Message Index
[*] Previous page
Go to full version