-
Notifications
You must be signed in to change notification settings - Fork 23
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
Problem Building on OS X Mavericks #65
Comments
Hey there! Unfortunately I do not have access to a mac(though I really should for testing purposes), but I will definitely look into this and help you out. I have a couple of things you could try that might help to pin point what's going on. Not much, but it's a start.
Hope that helps! Let me know what happens. |
I built SFML 2.0 by hand and it worked just fine. I'm unable to get CSFML to build. It looks like the same set of errors. Should I go bother them? |
I was able to get CSFML to build now. Here's what I'm getting now: [jared@Adam-Smith DSFML-C-clang (master)]$ make
Scanning dependencies of target dsfml-system
[ 2%] Building CXX object src/SFML/System/CMakeFiles/dsfml-system.dir/Clock.cpp.o
[ 5%] Building CXX object src/SFML/System/CMakeFiles/dsfml-system.dir/Err.cpp.o
Linking CXX shared library ../../../lib/libdsfml-system.dylib
[ 5%] Built target dsfml-system
Scanning dependencies of target dsfml-window
[ 7%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Context.cpp.o
[ 10%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Err.cpp.o
[ 12%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Joystick.cpp.o
[ 15%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Keyboard.cpp.o
[ 17%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Mouse.cpp.o
[ 20%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/VideoMode.cpp.o
[ 23%] Building CXX object src/SFML/Window/CMakeFiles/dsfml-window.dir/Window.cpp.o
Linking CXX shared library ../../../lib/libdsfml-window.dylib
[ 23%] Built target dsfml-window
Scanning dependencies of target dsfml-network
[ 25%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Err.cpp.o
[ 28%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Ftp.cpp.o
[ 30%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Http.cpp.o
[ 33%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/IpAddress.cpp.o
[ 35%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/Packet.cpp.o
[ 38%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/SocketSelector.cpp.o
[ 41%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/TcpListener.cpp.o
[ 43%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/TcpSocket.cpp.o
[ 46%] Building CXX object src/SFML/Network/CMakeFiles/dsfml-network.dir/UdpSocket.cpp.o
Linking CXX shared library ../../../lib/libdsfml-network.dylib
[ 46%] Built target dsfml-network
Scanning dependencies of target dsfml-graphics
[ 48%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Err.cpp.o
[ 51%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Font.cpp.o
[ 53%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Image.cpp.o
[ 56%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/RenderTexture.cpp.o
[ 58%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/RenderWindow.cpp.o
[ 61%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Shader.cpp.o
[ 64%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Texture.cpp.o
[ 66%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/Transform.cpp.o
[ 69%] Building CXX object src/SFML/Graphics/CMakeFiles/dsfml-graphics.dir/View.cpp.o
Linking CXX shared library ../../../lib/libdsfml-graphics.dylib
[ 69%] Built target dsfml-graphics
Scanning dependencies of target dsfml-audio
[ 71%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/ALCheck.cpp.o
[ 74%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/AudioDevice.cpp.o
[ 76%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/Err.cpp.o
[ 79%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/Listener.cpp.o
[ 82%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/Sound.cpp.o
[ 84%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundBuffer.cpp.o
[ 87%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/sfSoundFile.cpp.o
[ 89%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundFile.cpp.o
[ 92%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/InternalSoundRecorder.cpp.o
[ 94%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundRecorder.cpp.o
[ 97%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundSource.cpp.o
[100%] Building CXX object src/SFML/Audio/CMakeFiles/dsfml-audio.dir/SoundStream.cpp.o
Linking CXX shared library ../../../lib/libdsfml-audio.dylib
Undefined symbols for architecture x86_64:
"_alBufferData", referenced from:
_sfSoundBuffer_fillBuffer in SoundBuffer.cpp.o
_sfSoundStream_fillBuffer in SoundStream.cpp.o
"_alDeleteBuffers", referenced from:
_sfSoundBuffer_alDeleteBuffer in SoundBuffer.cpp.o
_sfSoundStream_deleteBuffers in SoundStream.cpp.o
"_alDeleteSources", referenced from:
_sfSoundSource_destroy in SoundSource.cpp.o
"_alGenBuffers", referenced from:
_sfSoundBuffer_alGenBuffers in SoundBuffer.cpp.o
_sfSoundStream_alGenBuffers in SoundStream.cpp.o
(maybe you meant: _sfSoundStream_alGenBuffers, _sfSoundBuffer_alGenBuffers )
"_alGenSources", referenced from:
_sfSoundSource_initialize in SoundSource.cpp.o
"_alGetBufferi", referenced from:
_sfSoundBuffer_getSampleRate in SoundBuffer.cpp.o
_sfSoundBuffer_getChannelCount in SoundBuffer.cpp.o
_sfSoundStream_getBufferSampleSize in SoundStream.cpp.o
"_alGetEnumValue", referenced from:
sf::priv::AudioDevice::getFormatFromChannelCount(unsigned int) in AudioDevice.cpp.o
"_alGetError", referenced from:
sf::priv::alCheckError(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int) in ALCheck.cpp.o
"_alGetSource3f", referenced from:
_sfSoundSource_getPosition in SoundSource.cpp.o
"_alGetSourcef", referenced from:
_sfSound_getPlayingOffset in Sound.cpp.o
_sfSoundSource_getPitch in SoundSource.cpp.o
_sfSoundSource_getVolume in SoundSource.cpp.o
_sfSoundSource_getMinDistance in SoundSource.cpp.o
_sfSoundSource_getAttenuation in SoundSource.cpp.o
_sfSoundStream_getPlayingOffset in SoundStream.cpp.o
"_alGetSourcei", referenced from:
_sfSound_getLoop in Sound.cpp.o
_sfSoundSource_isRelativeToListener in SoundSource.cpp.o
_sfSoundSource_getStatus in SoundSource.cpp.o
_sfSoundStream_clearQueue in SoundStream.cpp.o
_sfSoundStream_getNumberOfBuffersProccessed in SoundStream.cpp.o
"_alIsExtensionPresent", referenced from:
sf::priv::AudioDevice::isExtensionSupported(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in AudioDevice.cpp.o
"_alSource3f", referenced from:
_sfSoundSource_setPosition in SoundSource.cpp.o
"_alSourcePause", referenced from:
_sfSoundStream_alSourcePause in SoundStream.cpp.o
(maybe you meant: _sfSoundStream_alSourcePause)
"_alSourcePlay", referenced from:
_sfSoundStream_alSourcePlay in SoundStream.cpp.o
(maybe you meant: _sfSoundStream_alSourcePlay)
"_alSourceQueueBuffers", referenced from:
_sfSoundStream_queueBuffer in SoundStream.cpp.o
"_alSourceStop", referenced from:
_sfSoundStream_alSourceStop in SoundStream.cpp.o
(maybe you meant: _sfSoundStream_alSourceStop)
"_alSourceUnqueueBuffers", referenced from:
_sfSoundStream_clearQueue in SoundStream.cpp.o
_sfSoundStream_UnqueueBuffer in SoundStream.cpp.o
"_alSourcef", referenced from:
_sfSound_setPlayingOffset in Sound.cpp.o
_sfSoundSource_setPitch in SoundSource.cpp.o
_sfSoundSource_setVolume in SoundSource.cpp.o
_sfSoundSource_setMinDistance in SoundSource.cpp.o
_sfSoundSource_setAttenuation in SoundSource.cpp.o
"_alSourcei", referenced from:
_sfSound_assignBuffer in Sound.cpp.o
_sfSound_detachBuffer in Sound.cpp.o
_sfSound_setLoop in Sound.cpp.o
_sfSoundSource_initialize in SoundSource.cpp.o
_sfSoundSource_setRelativeToListener in SoundSource.cpp.o
_sfSoundSource_destroy in SoundSource.cpp.o
_sfSoundStream_deleteBuffers in SoundStream.cpp.o
...
"_alcCaptureCloseDevice", referenced from:
InternalSoundRecorder::closeDevice() in InternalSoundRecorder.cpp.o
"_alcCaptureOpenDevice", referenced from:
InternalSoundRecorder::initialize(unsigned int) in InternalSoundRecorder.cpp.o
"_alcCaptureSamples", referenced from:
InternalSoundRecorder::getSamplePointer(int) in InternalSoundRecorder.cpp.o
"_alcCaptureStart", referenced from:
InternalSoundRecorder::startCapture() in InternalSoundRecorder.cpp.o
"_alcCaptureStop", referenced from:
InternalSoundRecorder::stopCapture() in InternalSoundRecorder.cpp.o
"_alcCloseDevice", referenced from:
sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
"_alcCreateContext", referenced from:
sf::priv::AudioDevice::AudioDevice() in AudioDevice.cpp.o
"_alcDestroyContext", referenced from:
sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
"_alcGetIntegerv", referenced from:
InternalSoundRecorder::getSampleNumber() in InternalSoundRecorder.cpp.o
"_alcIsExtensionPresent", referenced from:
sf::priv::AudioDevice::isExtensionSupported(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in AudioDevice.cpp.o
"_alcMakeContextCurrent", referenced from:
sf::priv::AudioDevice::AudioDevice() in AudioDevice.cpp.o
sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
sf::priv::AudioDevice::~AudioDevice() in AudioDevice.cpp.o
"_alcOpenDevice", referenced from:
sf::priv::AudioDevice::AudioDevice() in AudioDevice.cpp.o
"_sf_close", referenced from:
sf::priv::SoundFile::~SoundFile() in SoundFile.cpp.o
sf::priv::SoundFile::~SoundFile() in SoundFile.cpp.o
sf::priv::SoundFile::openRead(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in SoundFile.cpp.o
sf::priv::SoundFile::openRead(void const*, unsigned long) in SoundFile.cpp.o
sf::priv::SoundFile::openRead(sf::InputStream&) in SoundFile.cpp.o
sf::priv::SoundFile::openWrite(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int) in SoundFile.cpp.o
"_sf_open", referenced from:
sf::priv::SoundFile::openRead(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in SoundFile.cpp.o
sf::priv::SoundFile::openWrite(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int) in SoundFile.cpp.o
"_sf_open_virtual", referenced from:
sf::priv::SoundFile::openRead(void const*, unsigned long) in SoundFile.cpp.o
sf::priv::SoundFile::openRead(sf::InputStream&) in SoundFile.cpp.o
"_sf_read_short", referenced from:
sf::priv::SoundFile::read(short*, unsigned long) in SoundFile.cpp.o
"_sf_seek", referenced from:
sf::priv::SoundFile::seek(sf::Time) in SoundFile.cpp.o
"_sf_strerror", referenced from:
sf::priv::SoundFile::openRead(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in SoundFile.cpp.o
sf::priv::SoundFile::openRead(void const*, unsigned long) in SoundFile.cpp.o
sf::priv::SoundFile::openRead(sf::InputStream&) in SoundFile.cpp.o
sf::priv::SoundFile::openWrite(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int) in SoundFile.cpp.o
"_sf_write_short", referenced from:
sf::priv::SoundFile::write(short const*, unsigned long) in SoundFile.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libdsfml-audio.2.0.dylib] Error 1
make[1]: *** [src/SFML/Audio/CMakeFiles/dsfml-audio.dir/all] Error 2
make: *** [all] Error 2 |
What did you do to get the other stuff building? Just curious. This looks like something I can fix, but I might need you to do the testing since I don't have a Mac. It seems like OpenAL and libsndfile aren't being linked, which is strange considering CMake was able to find them. Since this is a high priority issue it'll take precedence over my other stuff. Hopefully I can get a fix out for you soon! |
Also, it looks like everything except the audio module was built. It is inconvenient for sure, but at least you can start using the other parts of the binding until I can sort the audio part out. Feel free to open up an issue for any other problems you might encounter! |
So I deleted the But now I'm getting all the same errors no matter what I try to build, so I have no idea what's going on. I'm willing to help out any way I can [= |
I just tried that same strategy to build DSFML-C and now I'm back to the original error. |
Wow. This is crazy. I'll do what I can to help you, but with out a Mac of my own I'm worried there's not much that I can do. Try to not lose hope though! I have Saturday off, and tomorrow morning free. I've also decided that I'll be getting an extra HDD and getting OS X up and running on my own machine. For now, it might be a good idea to post in the D section of the SFML forums with a title that specifies problems with OS X. Hiura, SFML's OS X guy, has posted in there before when I has some Mac issues. It's possible he might have some answers or suggestions. |
Okay! I figured something out. When I got CSFML to build, I must have accidentally built it against Dynamic Libraries of SFML-2.0, not static ones ( Doing the same thing with DSFML-C gets me able to build everything but the audio lib. |
Does that mean you'd need to include both the SFML .dylibs and the DSFML .dylibs if you wanted to build anything with DSFML? As far as I know, CSFML is supposed to use the static version library when it builds, so DSFML-C should be the same. I would post in the C section of the SFML forums and just verify this. Laurent or someone else might be able to help you out and we can get some answers. |
I have a post up in the C section of the SFML forums. I'll post in the D section as well. |
Cool. I saw both of them. Let's hope we get something! By the way, thanks for being patient and helping me track this down! |
I should be thanking you for putting this binding together and helping me get everything resolved! It looks like my post in teh D section of the forums was deleted ]= Laurent says there was a recent major modification to the static build of CSFML which is untested on Mac. This is most likely causing the issues. I'll keep you posted if I find out more. |
I saw that! I wonder what happened. Maybe it was deleted because it was a duplicate post? I didn't have a chance to read it so I don't know. Looks like your update shows some promise though. The actual modification wasn't really in CSFML, it was to the way SFML static libraries are now built. Before it would gather all dependencies for you in some crazy way I don't understand, but now you need to specify those during the link process, and that's what broke things. You can read more about it in this thread if you want. There's something I've been considering that would fix this, but it would involve linking our D program to the SFML dynamic libraries, the DSFML-C libraries, and the D DSFML libraries. It would work, but could be a little annoying setting a project up. |
Hey, I've been following that thread all day, it's what helped me make some of the progress I've made. But now I'm a bit stuck.. it looks like it's looking for OpenAL headers, but all I see is the include |
Okay, I got it. OpenAL is a framework that ships with Mac OS X. That was the last hurdle! They both built! DSFML- C, DSFML, and CSFML all build. But now there's a new problem: (I'm using
import std.stdio;
import mapping.map;
import dsfml.graphics.all;
void main()
{
}
{
"name": "dgame",
"description": "An example project skeleton",
"homepage": "http://example.org",
"copyright": "Copyright © 2000, Your Name",
"authors": [
"Your Name"
],
"dependencies": {
},
"dflags": [
"-I/Users/jared/src/DSFML/src/",
"-L+/Users/jared/src/DSFML-C Builds/clang/lib/",
"-L+/Users/jared/src/DSFML/lib/"
]
} Output: [jared@Adam-Smith DGame (master)]$ dub -v
Using dub registry url 'http://code.dlang.org/'
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/jared/.dub/packages/
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/Users/jared/Code/DGame/.git'
Note: Failed to determine version of package dgame at /Users/jared/Code/DGame. Assuming ~master.
Collecting dependencies for dgame
Checking dependencies in '/Users/jared/Code/DGame'
dub initialized
Generating using build
Using config application for dgame
Using config application for dgame
Building configuration "application", build type debug
Application output name is '/tmp/dub/2226245526/dgame'
Running dmd (compile)...
dmd -I/Users/jared/src/DSFML/src/ -L+/Users/jared/src/DSFML-C Builds/clang/lib/ -L+/Users/jared/src/DSFML/lib/ -w -g -debug -c -of/tmp/dub/2226245526/temp.o -version=Have_dgame -I/Users/jared/Code/DGame/source -J/Users/jared/Code/DGame/views source/app.d source/mapping/generator.d source/mapping/map.d source/mapping/tile.d
Linking...
dmd -of/tmp/dub/2226245526/dgame /tmp/dub/2226245526/temp.o -g
Undefined symbols for architecture x86_64:
"_D5dsfml8graphics3all12__ModuleInfoZ", referenced from:
_D3app12__ModuleInfoZ in temp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
Error: Link command failed with exit code 1
Full exception: object.Exception@source/dub/compilers/dmd.d(120): Link command failed with exit code 1
----------------
5 dub 0x0000000102639657 pure @safe bool std.exception.enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) + 107
6 dub 0x00000001026230ff void dub.compilers.dmd.DmdCompiler.invokeLinker(const(dub.compilers.compiler.BuildSettings), const(dub.compilers.compiler.BuildPlatform), immutable(char)[][]) + 987
7 dub 0x0000000102626f05 void dub.generators.build.BuildGenerator.generateProject(dub.generators.generator.GeneratorSettings) + 4897
8 dub 0x00000001025ff2e4 void dub.dub.Dub.generateProject(immutable(char)[], dub.generators.generator.GeneratorSettings) + 160
9 dub 0x00000001025f3fbd _Dmain + 6333
10 dub 0x00000001026dc951 extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain() + 33
11 dub 0x00000001026dc49d extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate()) + 45
12 dub 0x00000001026dc99d extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll() + 61
13 dub 0x00000001026dc49d extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate()) + 45
14 dub 0x00000001026dc451 _d_run_main + 457
15 dub 0x00000001026dc280 main + 20
16 libdyld.dylib 0x00007fff909dc5fd start + 1
17 ??? 0x0000000000000002 0x0 + 2
Run 'dub help' for usage information.
[jared@Adam-Smith DGame (master)]$ |
I'm not terribly familiar with dub, but I will be trying to put in a dub file for DSFML in the near future. It looks like you are correctly setting up your link paths, but your dependency list is blank so you aren't actually linking to any of the libraries themselves. |
Judging from their docs, it looks like the One thing, in your example, you have a bunch of files like |
Yep, that's why I need to get a dub file made :P The dsfml-xxx-2.lib are just for windows. They're import libraries. In your case, you'll be linking to the dsfml-xxx-2.dylibs instead. The libdsfml-xxx.a files will be replacing the dsfml-xxx.lib files in the tutorial. |
That'd be awesome. My head is swimming with all this stuff right now [= This is what I was just trying: dmd main.d libdsfml-window.dylib libdsfml-graphics.dylib libdsfml-system.dylib -I/Users/jared/src/DSFML/src/ -L+/Users/jared/src/DSFML-C-Builds/clang/lib/ -L+/Users/jared/src/DSFML/lib/
Error: unrecognized file extension dylib |
Soooo I think I got the command right, but now I'm getting undefined symbol issues: dmd main.d -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-L/Users/jared/src/DSFML/lib/ -L-ldsfml-system -L-ldsfml-window -L-ldsfml-graphics -g
Undefined symbols for architecture x86_64:
"_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__ctorMFNaNbNcNfffZS5dsfml6system7vector214__T7Vector2TfZ7Vector2", referenced from:
__Dmain in main.o
"_D5dsfml6system7vector214__T7Vector2TfZ7Vector26__initZ", referenced from:
__Dmain in main.o
"_D5dsfml6window15contextsettings15ContextSettings7DefaultxS5dsfml6window15contextsettings15ContextSettings", referenced from:
__Dmain in main.o
"_D5dsfml6window5event5Event6__initZ", referenced from:
__Dmain in main.o
"_D5dsfml6window9videomode9VideoMode6__ctorMFNckkkZS5dsfml6window9videomode9VideoMode", referenced from:
__Dmain in main.o
"_D5dsfml8graphics11circleshape11CircleShape6__ctorMFfkZC5dsfml8graphics11circleshape11CircleShape", referenced from:
__Dmain in main.o
"_D5dsfml8graphics11circleshape11CircleShape7__ClassZ", referenced from:
__Dmain in main.o
"_D5dsfml8graphics12renderstates12RenderStates7DefaultFZS5dsfml8graphics12renderstates12RenderStates", referenced from:
__Dmain in main.o
"_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow", referenced from:
__Dmain in main.o
"_D5dsfml8graphics12renderwindow12RenderWindow7__ClassZ", referenced from:
__Dmain in main.o
"_D5dsfml8graphics14rectangleshape14RectangleShape6__ctorMFS5dsfml6system7vector214__T7Vector2TfZ7Vector2ZC5dsfml8graphics14rectangleshape14RectangleShape", referenced from:
__Dmain in main.o
"_D5dsfml8graphics14rectangleshape14RectangleShape7__ClassZ", referenced from:
__Dmain in main.o
"_D5dsfml8graphics3all12__ModuleInfoZ", referenced from:
_D4main12__ModuleInfoZ in main.o
"_D5dsfml8graphics5color5Color3RedyS5dsfml8graphics5color5Color", referenced from:
__Dmain in main.o
"_D5dsfml8graphics5color5Color4BlueyS5dsfml8graphics5color5Color", referenced from:
__Dmain in main.o
"_D5dsfml8graphics5color5Color5BlackyS5dsfml8graphics5color5Color", referenced from:
__Dmain in main.o
"_D5dsfml8graphics5color5Color5GreenyS5dsfml8graphics5color5Color", referenced from:
__Dmain in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1 |
I'll have to update the tutorial for OS X because it is a little different. Looks like you almost had it. You just need to link with both sets of libs. Try this:
|
Now I'm getting: dmd main.d libdsfml-system.a libdsfml-window.a libdsfml-graphics.a -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-L/Users/jared/src/DSFML/lib/ -L-lcsfml-system -L-ldsfml-window -L-lcsfml-graphics -g
clang: error: no such file or directory: 'libdsfml-system.a'
clang: error: no such file or directory: 'libdsfml-window.a'
clang: error: no such file or directory: 'libdsfml-graphics.a' |
Hmm.. Assuming libdsfml-system.a, libdsfml-window.a, and libdsfml-graphics.a are in your /Users/jared/src/DSFML/lib/ directory, that should work. Also, there was a typo in the command line I posted. it used |
Yea, I fixed the typo... trying to work out the source issues. Yea, the files are in |
So the |
Putting in the fully qualified path I get dmd main.d /Users/jared/src/DSFML/lib/libdsfml-system.a /Users/jared/src/DSFML/lib/libdsfml-graphics.a -L/Users/jared/src/DSFML/lib/ -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-ldsfml-system -L-ldsfml-window -L-ldsfml-graphics -g
ld: can't map file, errno=22 file '/Users/jared/src/DSFML/lib/' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1 Also... I'm missing |
Re: missing rdmd build.d
You're about to build DSFML! Go you!
Building for OSX
Building system module.
Building audio module.
Building network module.
Building window module.
Building graphics module.
Done!
[jared@Adam-Smith DSFML (master)]$ ll lib
total 5304
drwxr-xr-x 6 jared staff 204B Nov 8 17:43 .
drwxr-xr-x 8 jared staff 272B Nov 8 17:43 ..
-rw-r--r-- 1 jared staff 702K Nov 8 20:21 libdsfml-audio.a
-rw-r--r-- 1 jared staff 869K Nov 8 20:21 libdsfml-graphics.a
-rw-r--r-- 1 jared staff 556K Nov 8 20:21 libdsfml-network.a
-rw-r--r-- 1 jared staff 514K Nov 8 20:21 libdsfml-system.a |
Sorry to keep spamming you. I think I've gotten to the point where I'm just missing dmd main.d /Users/jared/src/DSFML/lib/libdsfml-system.a /Users/jared/src/DSFML/lib/libdsfml-graphics.a -I/Users/jared/src/DSFML/src/ -L-L/Users/jared/src/DSFML-C-Builds/clang/lib/ -L-ldsfml-system -L-ldsfml-window -L-ldsfml-graphics -g
Undefined symbols for architecture x86_64:
"_D5dsfml6window15contextsettings15ContextSettings6__initZ", referenced from:
_D5dsfml8graphics12renderwindow12RenderWindow11getSettingsMxFZS5dsfml6window15contextsettings15ContextSettings in libdsfml-graphics.a(renderwindow_285_4d8.o)
"_D5dsfml6window15contextsettings15ContextSettings7DefaultxS5dsfml6window15contextsettings15ContextSettings", referenced from:
__Dmain in main.o
"_D5dsfml6window3all12__ModuleInfoZ", referenced from:
_D5dsfml8graphics3all12__ModuleInfoZ in libdsfml-graphics.a(all.o)
"_D5dsfml6window5event5Event6__initZ", referenced from:
__Dmain in main.o
"_D5dsfml6window6window12__ModuleInfoZ", referenced from:
_D5dsfml8graphics12renderwindow12__ModuleInfoZ in libdsfml-graphics.a(renderwindow.o)
_D5dsfml8graphics7texture12__ModuleInfoZ in libdsfml-graphics.a(texture.o)
"_D5dsfml6window6window6Window16getWindowPointerFC5dsfml6window6window6WindowZPv", referenced from:
_D5dsfml8graphics12renderwindow12RenderWindow12getWindowPtrMFC5dsfml6window6window6WindowZPv in libdsfml-graphics.a(renderwindow_285_4d8.o)
_D5dsfml8graphics12renderwindow12RenderWindow13windowPointerFC5dsfml6window6window6WindowZPv in libdsfml-graphics.a(renderwindow_285_4d8.o)
"_D5dsfml6window6window6Window6__ctorMFZC5dsfml6window6window6Window", referenced from:
_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAywE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFmKxS5dsfml6window15contextsettings15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow in libdsfml-graphics.a(renderwindow_285_4d8.o)
"_D5dsfml6window6window6Window7__ClassZ", referenced from:
_D5dsfml8graphics12renderwindow12RenderWindow7__ClassZ in libdsfml-graphics.a(renderwindow_285_4d8.o)
"_D5dsfml6window9videomode12__ModuleInfoZ", referenced from:
_D5dsfml8graphics12renderwindow12__ModuleInfoZ in libdsfml-graphics.a(renderwindow.o)
"_D5dsfml6window9videomode9VideoMode6__ctorMFNckkkZS5dsfml6window9videomode9VideoMode", referenced from:
__Dmain in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1 |
Is there any way you can do a pull request for the alerted cmake file? I think that would be easier for the Mac users. |
I'm actually pretty unfamiliar with CMake, and didn't make any changes to the file directly. Wanna help me get it setup? |
Oh, interesting. Looks like I just misunderstood the section you wrote. I don't know CMake too well, but I might be able to get it to the point where you can see what I am going for and could maybe finish it out. I pretty much just copied over everything from CSFML and played around with it until it worked :P I have tomorrow off, so I'll let you know if I think I have anything! |
Cool! Just so you know, I have a thread open on the DUB forums about my issues: http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/509/ |
Hey @Jebbs, just wanted to check in and see if there's anything I can do to push this forward. |
Thanks for checking in! I was working on wrapping up another project of mine so that I could focus on DSFML before I start my planning for the SFML Game Jam, but I got to a good stopping point yesterday so DSFML has my full attention now. :) For getting DSFML-C to build for OSX, I was planning on going through SFML's CMake files for information on how it does things. It should really be pretty similar to the way it builds the shared libraries in terms of scanning for and grabbing all dependencies. I'll be able to check it out today or tomorrow, so expect an update on that soon. I hope to have something that can be tested in the next couple of days. Relating to the DUB stuff, I added a temp DUB package.json that should be ready enough by the end of the day for testing. Never used DUB before, so I don't know how long that will take, but you can also expect an update on that very soon. |
More updates! I'm looking in to the library name thing. I think the reason you needed the full path to your static libs is relevant to the issue.(check out #68) Because of this, the DUB file won't be ready until tomorrow, but I think you won't have the error you experienced in that post you linked to any longer. Also, it looks like Laurent did some updates for CSFML's CMake files so that might take longer than I originally thought to get those looked into. I need to make sure we have everything we need when they build dynamically. |
Updates! Haven't had a chance to take care of the cmake stuff yet, but I'm almost there. The DUB package.json is just about ready, I'm just getting a few couple of things finished up. I have my own thread on the DUB forums, and Sönke Ludwig has been helping me out as well. Shouldn't be much longer. About the static library issue, I updated a few things in the wiki and in the build script. When you run the build script, it produces libraries named libdsfml-xxx-2.a, the -2 prefix being new so that the names are different from the dylibs. Adding the path to the static libs to the linker like before, you should now be able to link to them the same way as the dylibs: |
More update! I was successful in getting dub to build a DSFML application. Changes have been uploaded, but I'll do a short tutorial tomorrow! |
Forgot to let you know about this, but I did add a tutorial to the wiki. You can find it here: https://github.com/Jebbs/DSFML/wiki/Building-The-Library-And-Your-First-DSFML-Program%28DUB-Edition!%29 Let me know what you think! My next project is to update parts of the wiki to make it better, and split up the tutorials for each OS. That shoudl make following them a little easier. :) I also wanted to say that I am working on getting OSX up and running on a VM. I hope to be able to have things working and building soon so hopefully we can have easier building all around. You'll know if I make progress there! |
Hey! Sorry I've been so unresponsive. Slammed at work right now. I'm excited to try out the new DUB package stuff and see if I can get it to work =D Let me know if you need any help testing things for OS X. I'll be digging into all this in more detail soon I hope... either tonight or tomorrow. |
No worries. Things are pretty crazy for me too. I should have a new DUB tutorial done today by the way, so be on the look out for that. I'm going to split up the tutorials a little bit to make things a little more clearer. We'll have a tutorial for building from source and then a different tutorial for building the programs either via. I'll also splitting everything up based on OS. All of that should be done today. I'll definitely take you up on the testing, but because of my game jam I won't have much time to dedicate to the binding until next year, so no rush on all that. |
Just opened up a new issue that is very much relevant to this. Thought you might want to know! |
Ha, just kidding. It isn't that relevant to you after all. I forgot that your original problem was building the shared library to begin with, not that it couldn't find the libraries during the link phase. |
This is relevant though. :P |
Nice! I'm going on a two week vacation starting tomorrow and I'm excited to dig into this again. |
I'm going to move this to the 2.1 Milestone as I probably won't get to this until after my game jam, in which case I'll be doing a bunch of other DSFML-C related things at the same time, which would fix this problem. Hope you can wait! :P |
Hey Jared! Just wanted to let you know that I got around to merging DSFML-C with the SFML sources. I was wondering if you could try building it to see if you get any kind of errors. So far I have had good results though! Anyways, you can find the repo here: https://github.com/Jebbs/DSFML-C/tree/Merged I really need to get a mac.... |
Yea totally! I'll check this out tomorrow [= |
Just wondering if you had a chance to do this yet. If it all checks out, I'm going to make the push for this version of the back end. I am in the process of acquiring a mac myself so I should be able to do testing myself soon! |
Hey sorry, Work kinda exploded with business. I'm gonna try real hard to do it today Jared McFarland On Wed, May 14, 2014 at 5:16 PM, Jeremy DeHaan notifications@github.comwrote:
|
It's all good. I totally understand having stuff explode on you. No rush! |
So I now have a mac, and though it is a pretty crappy one I am still able to build things on it. I tested the merged stuff, and not only do the dylibs build with out error, so does the exec that links to them. I do have some OpenGL issues, but I think it is related to my own hardware since my mac is seriously out of date. I'll try to see if I can get it fixed, but as far as I can tell it should work no problem on any mac that was built after 2006. And hopefully work has slowed down! |
I'll keep this open for a little bit in case you have a chance to test it and give feedback or until I can figure out what is going on with my crazy drawing issues. |
Hey dude! SO sorry I've been such a flake. Work slowed down for a few days and then I got a new job... I'm now ramping up at a new place. I'll try to give this a go in the next couple of days. |
No worries! I know how it goes. The only thing you need to be sorry about is not using D. :P Hope everything goes well for you once you get around to it, and congrats on the new job! |
Hey! Just got a new Mac and need to get DSFML on it, so I'm gonna be running through everything this weekend. Will report back any issues I run into =D |
Awesome! I think the only thing that's really changed is DSFML-C doesn't rely on SFML anymore, so you only need the current DSFML-C sources to build either dylibs or frameworks. |
And so, the time has come to close this issue! I just received email confirmation from someone that they were able to build and run a test program on OSX today. Huzzah! |
Hey there... I tried following the tutorial (including building my static libraries from SFML by hand), but am running into the following.
Configuration works fine. Generating the Makefile works fine. Here's my CMake setup:
And here's what I hit with bash:
Any help would be had [=
The text was updated successfully, but these errors were encountered: