Author Topic: Problems Linking GLFW3  (Read 7278 times)

MoMack20

  • Guest
Problems Linking GLFW3
« on: July 03, 2014, 08:40:04 pm »
Here's meh code:

#include <iostream>
#include <GL/glew.h>
#include <GLM/glm.hpp>
#define GLFW_DLL
#include <GLFW/glfw3.h>


using namespace std;

int main()
{
    if( !glfwInit() )
    {
        cout << "Failed to initialize GLFW\n" ;
        return -1;
    }
    return 0;
}


Here's the resulting build log:


-------------- Build: Debug in GLtest (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -g  -c C:\Users\MoMack\Documents\SummerStuff\GLtest\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -L"..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\include" -o bin\Debug\GLtest.exe obj\Debug\main.o   -lglew32s -lglew32 -lglfw3 -lopengl32
obj\Debug\main.o: In function `main':
C:/Users/MoMack/Documents/SummerStuff/GLtest/main.cpp:11: undefined reference to `glfwInit'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))


Help please. I'm dying on the inside a little.