Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Apr 2013
Offline Last Active Sep 18 2013 08:14 AM

Posts I've Made

In Topic: CMake linking issue with SFML/GLEW in Linux

22 August 2013 - 06:08 PM

I guess there is one more issue I'm having.  make clean is just not working.  When I type that in, it says:


"cmake_clean.cmake:21 (INCLUDE):

  include called with wrong number of arguments.  Include only takes one
This is in Linux, with MSVC2010, I have no issues.  Any ideas?

In Topic: CMake linking issue with SFML/GLEW in Linux

22 August 2013 - 09:27 AM

I REALLY REALLY appreciate the offer, it's in such an infant stage right now that I'm not that worried about an NDA or anything like that.  However, I kind of got it working last night.  I cleaned up the CMakeLists.txt and did things the way SFML does in their examples.  That got me past the immediate error, but moved it down the line to the pthread library.  SFML doesn't do a find_package(pthread) nor could I, so I decided that since Linux is easier to get these libraries with, I'd just use the dynamic libraries for Linux.  So, I have it use the static libraries for Windows and then in Linux it uses the static libraries.  I'm getting wildly different behavior in Linux (one of my assertions, which doesn't get thrown in Windows gets thrown immediately in Linux).  I'm going to have to work through that, but I'm happy to be doing that rather than messing with CMake.  


Thank you so much for your help, I'm sure once I go to build on Mac, I'll have plenty more questions, but I'm doing okay now.

In Topic: CMake linking issue with SFML/GLEW in Linux

19 August 2013 - 08:50 PM

Well, the weirdest thing is, I can make the examples for SFML fine.  There's specifically an X11 example, and I checked that CMake file in order to get what I should put here.  When I make that, it works fine.  I really can't figure out what the deal is here though...  I actually have the exact message print that you put, and nothing looks funny, except the include directories don't appear to have ';' after them, but that doesn't appear to be the issue.  This is incredibly frustrating, because I just want to code.

In Topic: CMake linking issue with SFML/GLEW in Linux

18 August 2013 - 09:27 PM

So, I've fixed a couple of issues.  This OpenGL issue has gone away, I was telling it to link against my executable and not the library, which was a problem, because the executable wasn't defined in the library's .txt file.  The script issue has just gone away, it wasn't solved by just restarting, because I didn't change anything between restarts in order to get it to work, but it's working without the script, so I'm not complaining about not making any headway.  I'm having a problem with it not finding X11 in Linux.  I have X11, because it compiled SFML fine, but as far as my makefile is concerned, it's not being linked properly.  I get this error when I try to make in Linux:

/usr/bin/ld: /home/hatfarm/SFML-2.1//lib/libsfml-window-s.a(WindowImplX11.cpp.o): undefined reference to symbol 'XGetWindowAttributes'
/usr/bin/ld: note: 'XGetWindowAttributes' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so so try adding it to the linker command line
/usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

Here's the code I have in my CMakeLists.txt file that should ensure that X11 is linked properly:

    find_package(X11 REQUIRED)
    	${LIB_LINKS} ${X11_LIBRARIES} )

That's in both my library and executable's CMakeFiles.txt...

I know that LIB_INCLUDES and LIB_LINKS are correctly used because it doesn't complain about OpenGL.  Any ideas?

In Topic: CMake linking issue with SFML/GLEW in Linux

17 August 2013 - 08:19 PM

That's actually how I've been working with it.  I'm still not sure why that issue is happening, but now I'm having issues with the libraries linked by SFML.  I'm working on that, but I'm having an issue with CMake saying: "Cannot specify link libraries for target

"/usr/lib/i386-linux-gnu/libGLU.so" which is not built by this project."


Any ideas?  It appears I've got GLU installed, that doesn't appear to be the issue.  Why is it so much more brutal in Linux?