SFML community forums
Help => General => Topic started by: Dig on April 19, 2009, 07:22:05 am
-
Is this possible, or is there another good solution to development on a Mac. Basically I'm using Netbeans for the Windows and Linux ports of my project and would love to be able to use NetBeans for the Mac port to keep everything as similar as possible.
I'm making some progress I think, but I'm drowning in dependency hell trying to get it to link properly. I think the amount of errors relating to Cocoa mean I'm missing something critical.
Undefined symbols:
"sf::priv::WindowImplCocoa::WindowImplCocoa(void*, sf::WindowSettings&)", referenced from:
sf::priv::WindowImpl::New(void*, sf::WindowSettings&)in libsfml-window-s.a(WindowImpl.o)
"_CGDisplayCurrentMode", referenced from:
sf::priv::VideoModeSupport::GetDesktopVideoMode() in libsfml-window-s.a(VideoModeSupport.o)
"_CFArrayGetCount", referenced from:
sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)
"_CFDictionaryGetValue", referenced from:
sf::priv::VideoModeSupport::GetDesktopVideoMode() in libsfml-window-s.a(VideoModeSupport.o)
sf::priv::VideoModeSupport::GetDesktopVideoMode() in libsfml-window-s.a(VideoModeSupport.o)
sf::priv::VideoModeSupport::GetDesktopVideoMode() in libsfml-window-s.a(VideoModeSupport.o)
sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)
sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)
sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)
Any ideas?
Cheers,
Nick
-
Which libraries do you link to your executable ?
And by the way I can read "libsfml-window-s.a", where does this library come from ? Did you build your own static libraries ?
-
Oh yes,
I forgot I'd done that, I built static libraries from the Linux sources. Maybe it doesn't work like that!
I'm new to the Mac in case that wasn't apparent. I'm not clear on how dynamic libraries work in that environment and was using static libs on the PC and Linux versions so rebuilt them on the Mac.
-
Indeed, it won't work. Mac OS X has its own window implementation named Cocoa whereas the Linux implementation uses X Window.
I did not even know one could build the SFML libraries through the makefiles (they don't include Mac OS X support), and I've been trying right now and I got failure message.
Dynamic library in the Mac OS X environment work the same way as in the Linux's one.
What OS are you used to ?
-
I've built the static libs in Linux and got it working and windows under MingW and got it working.
When I was first trying to us the prebuilt Mac OS X binaries I got errors regarding dynlib? (or something) files so I think I got side tracked down a different path trying to avoid them. (There is a Cocoa folder in the Window package, I included that by editing makefiles and got it to compile, but obviously not link!)
If we can forget the mess I've got into is it possible to compile an SFML project using gcc and not xcode's framework system? If not I'll struggle through with xcode and its quirky editing features.
Cheers,
Nick
-
Frameworks are not related to Xcode.
To use them with gcc, instead of -lyour_library_name, type -framework your_framework_name (-Fdir_name option to add framework search directory instead of -Ldir_name for libraries).
-
Oh, well thats nice and easy! I'll give it a go.
Cheers,
Nick
-
and it works and is similar enough to my Windows and Linux code to be easy to maintain.
Thanks for your help.
Cheers,
Nick