I'm trying to get the GLFW library to work with Pelles C. I downloaded the precompiled Visual Studio binaries and included all the right libraries. First, POLINK told me it can't find 'msvcrt.lib', so I copied it from the Visual Studio lib folder into my own. Then I got this error:
POLINK: error: Symbol 'free' is multiply defined: 'crt64.lib(free.obj)' and 'msvcrt.lib(MSVCR110.dll)'.
POLINK: error: Symbol 'malloc' is multiply defined: 'crt64.lib(malloc.obj)' and 'msvcrt.lib(MSVCR110.dll)'.
I then turned on "Omit default library name in object files" to remove the conflict. However, I then got another list of errors:
POLINK: error: Unresolved external symbol '__stderr'.
POLINK: error: Unresolved external symbol '__negmaskf'.
POLINK: fatal error: 2 unresolved external(s).
Any suggestions?
- use mingw version of dll's
- create import library for that with polib.exe
;glfw3dll.def
LIBRARY glfw3.dll
EXPORTS
"glfwCreateWindow"
"glfwDefaultWindowHints"
"glfwDestroyWindow"
"glfwExtensionSupported"
"glfwGetClipboardString"
"glfwGetCurrentContext"
"glfwGetCursorPos"
"glfwGetFramebufferSize"
"glfwGetGammaRamp"
"glfwGetInputMode"
"glfwGetJoystickAxes"
"glfwGetJoystickButtons"
"glfwGetJoystickName"
"glfwGetKey"
"glfwGetMonitorName"
"glfwGetMonitorPhysicalSize"
"glfwGetMonitorPos"
"glfwGetMonitors"
"glfwGetMouseButton"
"glfwGetPrimaryMonitor"
"glfwGetProcAddress"
"glfwGetTime"
"glfwGetVersion"
"glfwGetVersionString"
"glfwGetVideoMode"
"glfwGetVideoModes"
"glfwGetWGLContext"
"glfwGetWin32Window"
"glfwGetWindowAttrib"
"glfwGetWindowMonitor"
"glfwGetWindowPos"
"glfwGetWindowSize"
"glfwGetWindowUserPointer"
"glfwHideWindow"
"glfwIconifyWindow"
"glfwInit"
"glfwJoystickPresent"
"glfwMakeContextCurrent"
"glfwPollEvents"
"glfwRestoreWindow"
"glfwSetCharCallback"
"glfwSetClipboardString"
"glfwSetCursorEnterCallback"
"glfwSetCursorPos"
"glfwSetCursorPosCallback"
"glfwSetErrorCallback"
"glfwSetFramebufferSizeCallback"
"glfwSetGamma"
"glfwSetGammaRamp"
"glfwSetInputMode"
"glfwSetKeyCallback"
"glfwSetMonitorCallback"
"glfwSetMouseButtonCallback"
"glfwSetScrollCallback"
"glfwSetTime"
"glfwSetWindowCloseCallback"
"glfwSetWindowFocusCallback"
"glfwSetWindowIconifyCallback"
"glfwSetWindowPos"
"glfwSetWindowPosCallback"
"glfwSetWindowRefreshCallback"
"glfwSetWindowShouldClose"
"glfwSetWindowSize"
"glfwSetWindowSizeCallback"
"glfwSetWindowTitle"
"glfwSetWindowUserPointer"
"glfwShowWindow"
"glfwSwapBuffers"
"glfwSwapInterval"
"glfwTerminate"
"glfwWaitEvents"
"glfwWindowHint"
"glfwWindowShouldClose"
EDIT:
polib.exe /DEF:glfw3dll.def /OUT:glfw3dll.lib /MACHINE:AMD64
Got it to work using:
polib /def:glfw3.def glfw3.lib /machine:amd64
Did you use dumpbin to create that .def file?
The resulting lib is surprisingly smaller than the VS one. Any idea why that is?
Thanks
Quote from: player55 on June 13, 2013, 07:33:37 PM
Did you use dumpbin to create that .def file?
no, i use this: http://forum.pellesc.de/index.php?topic=3700.msg13749#msg13749
Ah, that's a helpful add-in, thanks.
I wanted a truly static library though and I managed to build GLFW 3.0 in Pelles C for anyone who needs it (attached).