Anon136 (OP)
Legendary
Offline
Activity: 1722
Merit: 1217
|
|
April 11, 2015, 02:20:17 PM Last edit: April 11, 2015, 03:19:42 PM by Anon136 |
|
I created this thread because I am stuck on a linker library error but I thought rather than make it just about myself, maybe I could open it up to the whole community. The way this thread works: If you are in need of assistance, use the size=x-large and bold tag at the beginning of your post to specify how many bitcoins you are offering in exchange for a correct answer to your question/successful resolution to your problem. Next including a brief summary at the beginning of the post giving people some idea what sorts of languages or specific libraries it involves as well as the gist of the problem so that they may more easily determine, without needing to read your entire post, whether or not they possess the requisite skills necessary in order to be able to answer your question. Example: 0.01
Summary: Linker library error when attempting to use GLFW 64 bit windows binaries with "Microsoft visual studio community 2013"
Insert details here. Please do not use the large text for anything else, that way new questions will stand out from the chatter even at a quick glance. If you are answering someones question. Please provide a bitcoin address at the end of your post. Obviously stackoverflow already exists so there is an expectation here that if someone is paying for resolution that the assistant will be a bit more patient and accommodating.
|
Rep Thread: https://bitcointalk.org/index.php?topic=381041If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
|
|
|
Anon136 (OP)
Legendary
Offline
Activity: 1722
Merit: 1217
|
|
April 11, 2015, 02:58:06 PM Last edit: April 11, 2015, 03:12:29 PM by Anon136 |
|
0.01Summary: Linker library error when attempting to use GLFW 64 bit windows binaries with "Microsoft visual studio community 2013" I was following this tutorial. https://www.youtube.com/watch?v=j-55D2rsCSE @ 9:20 he gets the exact same errors I'm getting but then instead of explaining how to fix it he just cuts out the part where he solves it. He says "it was a quite simple error it was a linker library error". Well its not quite so simple for me, I've been trying to figure out what the heck to do for days now. So I am using "Microsoft visual studio community 2013". I started a new visual c++ empty project. Added a main.cpp to the source files directory. I downloaded the 64 bit windows pre-compiled binaries from http://www.glfw.org/download.html. Extracted the whole folder intact to the same location where it is putting my main.cpp. My main.cpp looks like this. #include "glfw-3.1.1.bin.WIN64\include\GLFW\glfw3.h"
int main(){ glfwInit(); } Next I added C:\Users\Aaron\Documents\Visual Studio 2013\Projects\Project5\Project5\glfw-3.1.1.bin.WIN64\include\GLFW to Property Page -> Configuration Properties -> VC++ Directories -> Include Directories Then i added C:\Users\Aaron\Documents\Visual Studio 2013\Projects\Project5\Project5\glfw-3.1.1.bin.WIN64\lib-vc2013 to Property Page -> Configuration Properties -> VC++ Directories -> Library Directories And finally I added C:\Users\Aaron\Documents\Visual Studio 2013\Projects\Project5\Project5\glfw-3.1.1.bin.WIN64\lib-vc2013 to Property Page -> Configuration Properties -> Linker -> General -> Additional Library Directories Even still I am getting the following error when I attempt to build and run. 1>------ Build started: Project: Project5, Configuration: Debug Win32 ------ 1>main.obj : error LNK2019: unresolved external symbol _glfwInit referenced in function _main 1>c:\users\aaron\documents\visual studio 2013\Projects\Project5\Debug\Project5.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
Rep Thread: https://bitcointalk.org/index.php?topic=381041If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
|
|
|
MunchCrunch
Newbie
Offline
Activity: 13
Merit: 0
|
|
April 11, 2015, 04:40:07 PM |
|
I'm a bit of a novice at programming but I'll try. Make sure your GLFW and VS targets match (32bit+32bit or 64bit+64bit) So make sure your program is compiling for 64bit as you're using 64bit libraries.
|
|
|
|
Anon136 (OP)
Legendary
Offline
Activity: 1722
Merit: 1217
|
|
April 11, 2015, 09:17:30 PM |
|
I'm a bit of a novice at programming but I'll try. Make sure your GLFW and VS targets match (32bit+32bit or 64bit+64bit) So make sure your program is compiling for 64bit as you're using 64bit libraries.
It is true that I was trying to build the application as 32bit while using glfw's 64 bit libraries (i think). So I went into project properties and at the top in the drop down menu "platform" i changed it from Win32 to x64 (which i think is what you were wanting me to do). Still getting the same error. 1>------ Build started: Project: Project5, Configuration: Debug x64 ------ 1>main.obj : error LNK2019: unresolved external symbol glfwInit referenced in function main 1>c:\users\aaron\documents\visual studio 2013\Projects\Project5\x64\Debug\Project5.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
Rep Thread: https://bitcointalk.org/index.php?topic=381041If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
|
|
|
MunchCrunch
Newbie
Offline
Activity: 13
Merit: 0
|
|
April 11, 2015, 09:33:11 PM |
|
I'm a bit of a novice at programming but I'll try. Make sure your GLFW and VS targets match (32bit+32bit or 64bit+64bit) So make sure your program is compiling for 64bit as you're using 64bit libraries.
It is true that I was trying to build the application as 32bit while using glfw's 64 bit libraries (i think). So I went into project properties and at the top in the drop down menu "platform" i changed it from Win32 to x64 (which i think is what you were wanting me to do). Still getting the same error. 1>------ Build started: Project: Project5, Configuration: Debug x64 ------ 1>main.obj : error LNK2019: unresolved external symbol glfwInit referenced in function main 1>c:\users\aaron\documents\visual studio 2013\Projects\Project5\x64\Debug\Project5.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Ok, try this first. #include "glfw3.h"
int main(){ glfwInit(); }
If that doesn't work then try this, just remember to change PATH:TO #pragma comment(lib, "PATH:TO\glfw3.lib")
#include "glfw-3.1.1.bin.WIN64\include\GLFW\glfw3.h"
int main(){ glfwInit(); }
|
|
|
|
Anon136 (OP)
Legendary
Offline
Activity: 1722
Merit: 1217
|
|
April 11, 2015, 10:01:42 PM |
|
This #include "glfw3.h"
int main(){ glfwInit(); } Did nothing. However this #pragma comment(lib, "C:/Users/Aaron/Documents/Visual Studio 2013/Projects/Project5/Project5/glfw-3.1.1.bin.WIN64/lib-vc2013/glfw3.lib")
#include "glfw-3.1.1.bin.WIN64\include\GLFW\glfw3.h"
int main() { glfwInit(); } definitely did something. I had to switch from backslashes like this #pragma comment(lib, "C:\Users\Aaron\Documents\Visual Studio 2013\Projects\Project5\Project5\glfw-3.1.1.bin.WIN64\lib-vc2013\glfw3.lib") to forward slashes like this. #pragma comment(lib, "C:/Users/Aaron/Documents/Visual Studio 2013/Projects/Project5/Project5/glfw-3.1.1.bin.WIN64/lib-vc2013/glfw3.lib") inorder to resolve these errors. 1>------ Build started: Project: Project5, Configuration: Debug x64 ------ 1> main.cpp 1>main.cpp(1): warning C4129: 'A' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'D' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'V' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'P' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'g' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'l' : unrecognized character escape sequence 1>LINK : fatal error LNK1104: cannot open file 'C:UsersAaronDocumentsVisual Studio 2013ProjectsProject5Project5glfw-3.1.1.bin.WIN64lib-vc2013glfw3.lib' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== But after I switched from backslashes to forward slashes I got these errors. 1>------ Build started: Project: Project5, Configuration: Debug x64 ------ 1> main.cpp 1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>glfw3.lib(window.c.obj) : error LNK2019: unresolved external symbol __imp_glClear referenced in function glfwCreateWindow 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglCreateContext referenced in function _glfwCreateContext 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglDeleteContext referenced in function _glfwDestroyContext 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglGetProcAddress referenced in function _glfwPlatformGetProcAddress 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglMakeCurrent referenced in function _glfwPlatformMakeContextCurrent 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglShareLists referenced in function _glfwCreateContext 1>glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp_glGetIntegerv referenced in function _glfwRefreshContextAttribs 1>glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp_glGetString referenced in function glfwExtensionSupported 1>c:\users\aaron\documents\visual studio 2013\Projects\Project5\x64\Debug\Project5.exe : fatal error LNK1120: 8 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Not sure if that's progress but it could be
|
Rep Thread: https://bitcointalk.org/index.php?topic=381041If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
|
|
|
MunchCrunch
Newbie
Offline
Activity: 13
Merit: 0
|
|
April 11, 2015, 10:12:49 PM Last edit: April 11, 2015, 10:40:02 PM by MunchCrunch |
|
This #include "glfw3.h"
int main(){ glfwInit(); } Did nothing. However this #pragma comment(lib, "C:/Users/Aaron/Documents/Visual Studio 2013/Projects/Project5/Project5/glfw-3.1.1.bin.WIN64/lib-vc2013/glfw3.lib")
#include "glfw-3.1.1.bin.WIN64\include\GLFW\glfw3.h"
int main() { glfwInit(); } definitely did something. I had to switch from backslashes like this #pragma comment(lib, "C:\Users\Aaron\Documents\Visual Studio 2013\Projects\Project5\Project5\glfw-3.1.1.bin.WIN64\lib-vc2013\glfw3.lib") to forward slashes like this. #pragma comment(lib, "C:/Users/Aaron/Documents/Visual Studio 2013/Projects/Project5/Project5/glfw-3.1.1.bin.WIN64/lib-vc2013/glfw3.lib") inorder to resolve these errors. 1>------ Build started: Project: Project5, Configuration: Debug x64 ------ 1> main.cpp 1>main.cpp(1): warning C4129: 'A' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'D' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'V' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'P' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'g' : unrecognized character escape sequence 1>main.cpp(1): warning C4129: 'l' : unrecognized character escape sequence 1>LINK : fatal error LNK1104: cannot open file 'C:UsersAaronDocumentsVisual Studio 2013ProjectsProject5Project5glfw-3.1.1.bin.WIN64lib-vc2013glfw3.lib' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== But after I switched from backslashes to forward slashes I got these errors. 1>------ Build started: Project: Project5, Configuration: Debug x64 ------ 1> main.cpp 1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>glfw3.lib(window.c.obj) : error LNK2019: unresolved external symbol __imp_glClear referenced in function glfwCreateWindow 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglCreateContext referenced in function _glfwCreateContext 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglDeleteContext referenced in function _glfwDestroyContext 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglGetProcAddress referenced in function _glfwPlatformGetProcAddress 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglMakeCurrent referenced in function _glfwPlatformMakeContextCurrent 1>glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp_wglShareLists referenced in function _glfwCreateContext 1>glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp_glGetIntegerv referenced in function _glfwRefreshContextAttribs 1>glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp_glGetString referenced in function glfwExtensionSupported 1>c:\users\aaron\documents\visual studio 2013\Projects\Project5\x64\Debug\Project5.exe : fatal error LNK1120: 8 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Not sure if that's progress but it could be Well the warning is about conflicting libraries so just remove all the libraries that you added earlier in the thread Just to confirm, you do have a 64bit operating system? =================== Try changing to
|
|
|
|
Anon136 (OP)
Legendary
Offline
Activity: 1722
Merit: 1217
|
|
April 12, 2015, 02:11:30 AM |
|
yes i have a 64 bit os. removing all the libraries i added earlier didn't seem to help . i tried all possible combinations of the three. no difference .' no matter whether we get it figured out or not i just wanted to say thanks for all the help.
|
Rep Thread: https://bitcointalk.org/index.php?topic=381041If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
|
|
|
MunchCrunch
Newbie
Offline
Activity: 13
Merit: 0
|
|
April 12, 2015, 07:45:53 AM |
|
yes i have a 64 bit os. removing all the libraries i added earlier didn't seem to help . i tried all possible combinations of the three. no difference .' no matter whether we get it figured out or not i just wanted to say thanks for all the help. Thanks
|
|
|
|
fsb4000
Legendary
Offline
Activity: 1400
Merit: 1000
|
|
April 12, 2015, 12:17:05 PM Last edit: April 12, 2015, 12:37:14 PM by fsb4000 |
|
My btc address: 1LqXE9xzjLS3HcoRe6AvxAw9zhMimDWCjP 1. First, check what you're doing 64 bit app(because you use 64 bit libs) 2. Additional include directories 3. Linked options add additional dependecies add additional directories <path to file glfw3dll.lib> 4. copy glfw3.dll to a folder with project1.exe 5. run you're welcome and good luck https://i.imgur.com/OS2afeV.png
|
|
|
|
Anon136 (OP)
Legendary
Offline
Activity: 1722
Merit: 1217
|
|
April 12, 2015, 02:10:46 PM |
|
My btc address: 1LqXE9xzjLS3HcoRe6AvxAw9zhMimDWCjP 1. First, check what you're doing 64 bit app(because you use 64 bit libs) 2. Additional include directories 3. Linked options add additional dependecies add additional directories <path to file glfw3dll.lib> 4. copy glfw3.dll to a folder with project1.exe 5. run you're welcome and good luck I tried all of those different things at one point or another but i guess it just never came to-gather right. I still don't know how you figured all that out so idk if ill be back in the same position next time i want to use a different non-standard library, but hopefully given what i learned here today i'll be able to figure it out myself next time. Anyway thank-you so much.
|
Rep Thread: https://bitcointalk.org/index.php?topic=381041If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
|
|
|
|
Anon136 (OP)
Legendary
Offline
Activity: 1722
Merit: 1217
|
|
April 12, 2015, 02:40:49 PM |
|
I must have done at-least 3 dozen google searches. I don't know how I somehow never manage to search the right thing. Oh well. I shall remain forever cursed.
|
Rep Thread: https://bitcointalk.org/index.php?topic=381041If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
|
|
|
|