-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to Compile Linux Mint (Issues linking glfw) #12
Comments
I should also probably mention I am a new user to this repository. I just got my book in a few days ago and have been trying to get started. I'm not experienced with this code base and am to inexperienced to correct the makefile to make it compile correctly. |
Ok, I've resolved my problem and now I found a new one. In the "CMakeLists.txt" I found this section of code:
and I changed it to this
Now all the example programs compile, but I cannot get them to run. when I try to run them I get the error "Unable to create OpenGL Context" I assume this problem may have to do with what version of opengl I am using but I have no idea. I will continue searching. |
No solutions thus far to the error: "Unable to create OpenGL Context" OpenGL is installed and works fine for my other applications. I can't tell if the error is due to version issues. Any suggestions? |
Do your video card support opengl 4? Sent from my BlackBerry 10 smartphone. From: haynesmdSent: Monday, March 17, 2014 9:10 PMTo: openglsuperbible/sb6codeReply To: openglsuperbible/sb6codeSubject: Re: [sb6code] Fails to Compile Linux Mint (Issues linking glfw) (#12)No solutions thus far to the error: "Unable to create OpenGL Context" OpenGL is installed and works fine for my other applications. I can't tell if the error is due to version issues. Any suggestions? —Reply to this email directly or view it on GitHub. |
Just confirmed the OpenGL version is not the issue. I am trying on two computers. The first is a desktop with an AMD HD7970 that supports up to OpenGL4.2. The second is a laptop with 2nd generation Intell 4400 video card that only supports OpenGL 3.0. Desktop Laptop I get the same error message on both systems. Any suggestions? |
Okay, I found some more information that may help narrow down the problem. I think the problem still has to deal with my original error with the glfw libraries:
Is there any possible way I can maybe compile just one small hello world program as opposed to trying to use the entire code base? Such as maybe a hello world example? It is difficult to catch the error when compiling everything at once. |
I also came across this comment in the readme:
|
I have the same problem in ubuntu-gnome 13.10. Is this only happening on http://stackoverflow.com/questions/19719404/glfw-cant-create-4-3-context Check if this work. I cannot try this right now, i'm busy. 2014-03-18 11:18 GMT-04:00 haynesmd [email protected]:
Adderly Gonzalez |
Adderly, This makes about 25-30% of the examples run. The other examples will either open a black window or they will segment fault. What I did was in sb6.h I commented out 2 lines and added the following four lines at line number 96 just after the init().
This is a great improvement! Any suggestions on how to get the remainder of the examples running? |
Great. Well, to see what is happening. A viable solution will be to see what is http://www.glfw.org/docs/latest/quick.html#quick_capture_error This can give us, diagnostic information. 2014-03-18 14:02 GMT-04:00 haynesmd [email protected]:
Adderly Gonzalez |
Hmm, could I still potentially have some linking issues. I tried the glfwSetErrorCallback() function but it appears it is out of scope. Is this functionality of GLFW3? Not quite sure how to approach this. |
Yeah it is only available in GLFW3. 2014-03-18 14:45 GMT-04:00 haynesmd [email protected]:
Adderly Gonzalez |
Well I'm stumped. From the best that I can tell, trying to add the GLFW3 libraries to the code base creates quite a few conflicting library errors. It appears that the code base is built on the regular GLFW libraries. Adding GLFW3 makes it impossible to compile anything. |
We (you and i) can port it to GLFW3 at some time @haynesmd, right now i got no time. @grahamsellers are you gonna push some changes to the sources? @haynesmd well our somehow tutor is at Game Developer Conference in San Francisco at this time. |
I had this problem on Ubuntu 14.04, afaik it's a bug in the CMakeLists.txt where on line 13 the 'elif (UNIX)' should be 'elseif (UNIX)'. That fixed it for me! |
I have issues getting the code to compile and need some help. Nothing I've tried has worked so far. I am using linux mint 16 and have been programming for a while with opengl and have not ran into any problems, yet can not get these examples to compile. I have install glfw via 'apt-get libgflw-dev' and it has worked fine for me when running other code. My error looks like the program is not linking glfw properly, does anyone have suggestions to help me compile these examples on linux? When I compile with make I get the following error:
[ 6%] Built target sb6 Linking CXX executable bin/alienrain CMakeFiles/alienrain.dir/src/alienrain/alienrain.cpp.o: In function sb6::application::run(sb6::application*)': alienrain.cpp:(.text._ZN3sb611application3runEPS0_[_ZN3sb611application3runEPS0_]+0x21): undefined reference to 'glfwInit'
The text was updated successfully, but these errors were encountered: