I have written a little batch file to compile a project from emacs and when I added a glfw3.lib
to compiler argument I started to get this error:
LNK2019: unresolved external symbol glfwInit referenced in function WinMain.
So I created a project in Visual Studio 2012, added SAME libs and SAME includes, it magically compiled. What am I doing wrong?
This is my build.bat
file:
@echo off
mkdir ..\Build
pushd ..\Build
cl -Zi ..\source\win32main.cpp -I..\includes user32.lib gdi32.lib opengl32.lib ..\libs\glew32.lib ..\libs\glfw3.lib
popd
Main file:
#include <windows.h>
#include <GL/glfw3.h>
int CALLBACK
WinMain(HINSTANCE Instance,
HINSTANCE PrevInstance,
LPSTR CommandLine,
int ShowCode)
{
glfwInit(); // Here is the error, but i don't get why?
return 0;
}