Setting up GLFW in Code::Blocks

Started by
0 comments, last by rip-off 9 years, 8 months ago

Hi guys,

I wanted to try Code::Blocks instead of Visual Studio, but have some problems with compiling Hello World.

Using Windows 8.1, Code::Blocks 13.12 (MinGW 32), GLFW 3.0.4

I have downloaded 32 precompiled GLFW for MinGW, pasted sample code (http://www.glfw.org/documentation.html) and set up build options.

Here is my log build:

-------------- Build: debug in dependentia (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -LGLFW3\lib-mingw -o bin\debug\dependentia.exe obj\debug\src\main.o GLFW3\lib-mingw\libglfw3.a GLFW3\lib-mingw\glfw3dll.a

GLFW3\lib-mingw\libglfw3.a(window.c.obj):window.c:(.text+0x5fa): undefined reference to `glClear@4'
GLFW3\lib-mingw\libglfw3.a(context.c.obj):context.c:(.text+0x41): undefined reference to `glGetIntegerv@8'
GLFW3\lib-mingw\libglfw3.a(context.c.obj):context.c:(.text+0xb8): undefined reference to `glGetString@4'
GLFW3\lib-mingw\libglfw3.a(context.c.obj):context.c:(.text+0x608): undefined reference to `glGetString@4'
GLFW3\lib-mingw\libglfw3.a(context.c.obj):context.c:(.text+0x76f): undefined reference to `glGetIntegerv@8'
GLFW3\lib-mingw\libglfw3.a(context.c.obj):context.c:(.text+0x7b9): undefined reference to `glGetIntegerv@8'
GLFW3\lib-mingw\libglfw3.a(context.c.obj):context.c:(.text+0x856): undefined reference to `glGetIntegerv@8'
GLFW3\lib-mingw\libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x30a): undefined reference to `_imp__CreateDCW@16'
GLFW3\lib-mingw\libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x356): undefined reference to `_imp__GetDeviceCaps@8'
GLFW3\lib-mingw\libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x3a2): undefined reference to `_imp__DeleteDC@4'
GLFW3\lib-mingw\libglfw3.a(win32_gamma.c.obj):win32_gamma.c:(.text+0x7b): undefined reference to `_imp__CreateDCW@16'
GLFW3\lib-mingw\libglfw3.a(win32_gamma.c.obj):win32_gamma.c:(.text+0x91): undefined reference to `_imp__GetDeviceGammaRamp@8'
GLFW3\lib-mingw\libglfw3.a(win32_gamma.c.obj):win32_gamma.c:(.text+0x9d): undefined reference to `_imp__DeleteDC@4'
GLFW3\lib-mingw\libglfw3.a(win32_gamma.c.obj):win32_gamma.c:(.text+0x35b): undefined reference to `_imp__CreateDCW@16'
GLFW3\lib-mingw\libglfw3.a(win32_gamma.c.obj):win32_gamma.c:(.text+0x36d): undefined reference to `_imp__SetDeviceGammaRamp@8'
GLFW3\lib-mingw\libglfw3.a(win32_gamma.c.obj):win32_gamma.c:(.text+0x379): undefined reference to `_imp__DeleteDC@4'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x13b): undefined reference to `_imp__DescribePixelFormat@16'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x926): undefined reference to `_imp__DescribePixelFormat@16'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0xa5e): undefined reference to `_imp__DescribePixelFormat@16'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0xa80): undefined reference to `_imp__SetPixelFormat@12'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0xbaf): undefined reference to `_imp__wglMakeCurrent@8'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0xbca): undefined reference to `_imp__wglGetProcAddress@4'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x10d1): undefined reference to `_imp__wglCreateContext@4'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x10ff): undefined reference to `_imp__wglShareLists@8'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x1337): undefined reference to `_imp__wglDeleteContext@4'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x14d1): undefined reference to `_imp__wglMakeCurrent@8'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x1503): undefined reference to `_imp__wglMakeCurrent@8'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x1542): undefined reference to `_imp__SwapBuffers@4'
GLFW3\lib-mingw\libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x165d): undefined reference to `_imp__wglGetProcAddress@4'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
29 error(s), 0 warning(s) (0 minute(s), 0 second(s))

What are further steps I can take? I will provide more information if needed.

Advertisement

Please don't cross post.

This topic is closed to new replies.

Advertisement