Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - magicpen

Pages: [1]
1
General / Precompiled SFML 1.6 for 64 Bit Windows
« on: November 26, 2011, 06:13:49 pm »
I just switched to Windows 64 Bit and need new compiled versions of SFML 1.6 for 64 Bit MSVC. Where can I get those? Or does anyone have them lying around?

I'd of course also like SFML 2.0 64Bit, but that is still instable and not available precompiled at all. ;)

2
C / [Mac] Precompiled OpenAL in CMake
« on: August 31, 2011, 11:15:18 pm »
Thank you for the help. I got a precompiled SFML 1.6 to work, but not in the way I want. The reason for switching to 1.6 from 2.0 was that 1.6 comes precompiled and is labeled 'stable'.

My folder layout is this:

Code: [Select]

project/libs/SFML-1.6/include/SFML/Audio.hpp
project/libs/SFML-1.6/lib-mac/sfml-audio.framework/...
project/libs/SFML-1.6/lib-mac/sndfile.framework/...
project/libs/SFML-1.6/lib-win/sfml-audio.dll
project/libs/SFML-1.6/lib-win/sfml-audio.lib
project/libs/SFML-1.6/lib-win/libsndfile-1.dll
project/src/main.cpp


Here is my new CMakeList.txt
Code: [Select]
# SFML
set(SFML_PATH ${PROJECT_ROOT}/libs/SFML-1.6)
FIND_LIBRARY(SFML_AUDIO_LIBRARY NAMES sfml-audio sfml-audio.dll PATHS ${SFML_PATH}/lib-mac ${SFML_PATH}/lib-win DOC "SFML-audio library")
FIND_LIBRARY(SFML_SNDFILE_LIBRARY NAMES sndfile sndfile.dll PATHS ${SFML_PATH}/lib-mac ${SFML_PATH}/lib-win DOC "SFML-sndfile library")
include_directories(${SFML_PATH}/include)
set(SFML_LIBRARY ${SFML_AUDIO_LIBRARY} ${SFML_SNDFILE_LIBRARY})

...

add_executable(myapp ... )
target_link_libraries(myapp glfw ${SFML_LIBRARY} )


CMake correctly finds the library on my Mac when I compile the CMake file -
SFML_SNDFILE_LIBRARY = "/Users/username/Project/libs/SFML-1.6/lib-mac/sndfile.framework" and Compiling the project on XCode throws no linker errors.

When starting this compiled project now though, it crashes because the executable can't actually find the library/framework (Library not loaded ... image not found - exactly like this old post).

The way I got it to work was to copy all the libs to /System/Library/Frameworks - but I'd rather CMake took care of this somehow. Why doesn't it find those Frameworks when it can see the correct folder?

3
C / [Mac] Precompiled OpenAL in CMake
« on: August 25, 2011, 08:27:38 am »
Thank you for the help Hiura.

Quote
OpenAL or libsndfile?

Both. You can see how SFML link them in src/Audio/CMakeLists.txt (I think). OpenAL is by default installed on a Mac but sndfile isn't. So you'll have to ship a copy of sndfile.framework with your application (or rebuild it and link it statically but its license might not be compatible with your application's license – you should check that out).


:( I was trying to avoid including too much fluff to keep things simple and one-click-compilable. I guess I might as well just use a precompiled SFML 1.6 then.

Are there any tutorials/ressources on how to create a cross-platform CMake file that uses a precompiled 1.6 and its dependencies? I guess I want to automate the step "Integrating the libraries / frameworks into your application" via CMake for OSX, Windows and Linux. I suppose FindSFML.cmake can be used for this somehow.

4
C / [Mac] Precompiled OpenAL in CMake
« on: August 24, 2011, 08:09:58 pm »
I'm trying to integrate SFML2 into my own CMake process on Mac/OSX Lion with the latest XCode. Here is my CMakeLists.txt:

Code: [Select]
# SFML
add_subdirectory(${SFML_ROOT_PATH})
include_directories(${SFML_ROOT_PATH}/include)

# MyProject
...
add_executable(myproject WIN32 MACOSX_BUNDLE ${MYPROJECT_FILES} )
target_link_libraries(myproject sfml-system sfml-window sfml-audio)


I am using static compilation.

MyProject then has a Main.cpp that includes <SFML/system.hpp> and makes the SFML timer work reliably. It is awesome and clean.
However, using <SFML/audio.hpp> compilation fails because it can't use or find some proper library (OpenAL or libsndfile?) and complains about unreferenced symbols.

Here is the error Message XCode throws at me:

Code: [Select]
Ld /Users/myusername/Documents/Awesome_CMake/bin/Debug/myexecutable.app/Contents/MacOS/myexecutable normal x86_64
    cd /Users/myusername/Dropbox/Awesome_Trunk
    setenv MACOSX_DEPLOYMENT_TARGET 10.7
    /Developer/usr/bin/llvm-g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Users/myusername/Documents/Awesome_CMake/bin/Debug -F/Users/myusername/Documents/Awesome_CMake/bin/Debug -F/Applications -filelist /Users/myusername/Documents/Awesome_CMake/Awesome.build/Debug/myexecutable.build/Objects-normal/x86_64/myexecutable.LinkFileList -mmacosx-version-min=10.7 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  /Users/myusername/Documents/Awesome_CMake/libs/SFML-b9b3888/lib/Debug/libsfml-system-s-d.a /Users/myusername/Documents/Awesome_CMake/libs/SFML-b9b3888/lib/Debug/libsfml-window-s-d.a /Users/myusername/Documents/Awesome_CMake/libs/SFML-b9b3888/lib/Debug/libsfml-audio-s-d.a /Users/myusername/Documents/Awesome_CMake/libs/SFML-b9b3888/lib/Debug/libsfml-system-s-d.a -o /Users/myusername/Documents/Awesome_CMake/bin/Debug/myexecutable.app/Contents/MacOS/myexecutable

Undefined symbols for architecture x86_64:
  "_alGetError", referenced from:
      sf::priv::ALCheckError(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)in libsfml-audio-s-d.a(ALCheck.o)
  "_alGetEnumValue", referenced from:
      sf::priv::AudioDevice::GetFormatFromChannelsCount(unsigned int)in libsfml-audio-s-d.a(AudioDevice.o)
  "_alcIsExtensionPresent", referenced from:
      sf::priv::AudioDevice::IsExtensionSupported(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libsfml-audio-s-d.a(AudioDevice.o)
...


To fix this on Windows, I'd probably just have to copy the needed .dlls somewhere and be done with it. But I have no idea what to do on a Mac. Do I have to tell CMake something special so that it finds the precompiled libraries you provide? I'd rather not manually copy libraries/frameworks around on my harddrive because I work with multiple Macs that are not mine and I have to keep it portable.

Thank you in advance for any help. :) I'm really stumped here.  :oops:

Pages: [1]
anything