这是一个相当新鲜的香草Win7 64位安装与最新的MinGW64,在干净的(新鲜提取的)GLFW 2.7.5源目录中调用它们的使win32-msys命令。构建GLFW与MinGW64 gcc - 入门符号警告和链接器错误
[A]大厦库
#1 - 在GCC -c -I警告。 -I .. -Wall -mwin32 -02 -o win32_init.o win32_init.c:
win32_init.c: In function '_glfwPlatformTerminate':
win32_init.c:353:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#2 - 在GCC -c -I警告。 -I .. -Wall -mwin32 -02 -mdll -DGLFW_BUILD_DLL -D_GLFW_NO_DLOAD_GDI32 -D_GLFW_NO_DLOAD_WINMM -o win32_init_dll.o win32_init.c:
win32_init.c: In function '_glfwPlatformTerminate':
win32_init.c:353:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
但相关的输出文件做获得创建\ LIB \ WIN32 :glfw.dll,libglfwdll.a和libglfw.a。不过我担心这些可能会被破坏,因为我以后不可能通过gcc链接到它们 - 这个帖子中最后一个问题的相同问题在下面进行了描述。
[B]构建实例
#3 - 在triangle.exe警告,pong3d.exe,splitview.exe,mipmaps.exe,gears.exe,boing.exe,wave.exe, heightmap.exe:
c:/mingw64/x86_64-w64-mingw32/bin/ld.exe: warning: cannot find entry symbol _mainCRTStartup; defaulting to 0000000000401000
并非如此但是,对于listmodes.exe,mthello.exe,mtbench.exe和particles.exe其建立的罚款。事实上,这4只是后来唯一正常运行的,其他只是在没有输出或错误的情况下立即退出(自然,因为它们没有有效的入口点)。
[C]构建测试
警告在accuracy.exe,dynamic.exe:
c:/mingw64/x86_64-w64-mingw32/bin/ld.exe: warning: cannot find entry symbol _mainCRTStartup; defaulting to 0000000000401000
为defaults.exe没有这样的问题。对于dynamic.exe,它随后出现以下错误:
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x1c): undefined reference to `__imp_glfwGetVersion'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x62): undefined reference to `__imp_glfwInit'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0xcf): undefined reference to `__imp_glfwOpenWindow'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x10b): undefined reference to `__imp_glfwSetWindowTitle'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x118): undefined reference to `__imp_glfwSetWindowSizeCallback'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x123): undefined reference to `__imp_glfwSwapInterval'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x14a): undefined reference to `__imp_glfwGetWindowParam'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x151): undefined reference to `__imp_glfwSwapBuffers'
C:\Users\roxor\AppData\Local\Temp\cc8hsorn.o:dynamic.c:(.text.startup+0x174): undefined reference to `__imp_glfwTerminate'
collect2: ld returned 1 exit status
make[1]: *** [dynamic.exe] Error 1
make[1]: Leaving directory `/c/glfw64/tests'
make: *** [win32-msys] Error 2
现在这后一个是加载DLL的测试程序。您可能会认为这只是在正确的位置丢失了必要的库(.a和.dll),但请注意,在这一点上,我有所有必需的包含和库(从早期的GLFW make,即正好是完全相同如上述,相同的版本,同样的警告,相同的输出文件)在正确的地方:
- libglfwdll.a在\ MinGW64 \ x86_64的-W64-的mingw32 \ LIB(旁边libglu32.a,libopengl32.a)
- glfw.h在\ MinGW64 \ x86_64的-W64-的mingw32 \包括\ GL(旁gl.h,glaux.h,glu.h)
- glfw.dll在\ Windows和\ Windows \ System32下(下到opengl32.dll,glu32.dll)
现在,它与GLFW,Go和Mingw-w64的最新发行版本一起工作良好!感谢您添加64位支持:) – metaleap