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

Author Topic: Compiling Window lib on OSX  (Read 1549 times)

0 Members and 1 Guest are viewing this topic.

golgoth

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Compiling Window lib on OSX
« on: December 08, 2012, 09:43:40 pm »
Greetings,

Is there a way to compile the Window library on OS X Mountain Lion 10.8 without the need of:
Foundation/Foundation.h which I think is the objective c framework. The reason behind this is because I must not install XCode and especially the command line tools as I need to stick with GCC only.

Thx

golgoth

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Compiling Window lib on OSX
« Reply #1 on: December 08, 2012, 11:11:52 pm »
Note that I wouldn't mind installing the command line tools but when I do, I can compile my project using cmake and gcc (minus window lib) but cannot link the compiled library because of this error:

ld: can't open file (my project lib), errno=35 for architecture x86_64

It looks like a mixed up in the OSX libs which uses old 32bit dependencies and that, I don't know how to solve.
« Last Edit: December 09, 2012, 07:36:50 am by golgoth »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Compiling Window lib on OSX
« Reply #2 on: December 09, 2012, 06:41:43 pm »
You have to install at least the command line tools; there's no magic trick to get rid of dependancies.

Can you describe with more details what you're trying to do when the error occurs ? I need more context information to understand the issue.
SFML / OS X developer

golgoth

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Compiling Window lib on OSX
« Reply #3 on: December 10, 2012, 08:31:50 pm »
Certainly,

First, I'm developing on Windows 8 and I use VMware Workstation 9 to compile on Mountain Lion 10.8.2.

for simplicity sake, installing the CLT prevents me from generating a valid executable because of the error : ld: can't open file (my project lib), errno=35 for architecture x86_64

This error is inconsistent and it seems to rises proportionally with the time it takes to compile. In my rather complex setup, it's very hard to diagnose and there is one thing for sure, it's an Hocus Pocus bug.

What I do know however, is that I can compile my project without the CLT being installed but some dependencies are missing.

Therefore, I'm trying to find a way to compile the Window library on OSX without installing the CLT, if possible.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Compiling Window lib on OSX
« Reply #4 on: December 10, 2012, 10:11:25 pm »
I think 35 means resource temporarily unavailable. It could be anything, like a driver error, because of your custom installation.
SFML / OS X developer

golgoth

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Compiling Window lib on OSX
« Reply #5 on: December 11, 2012, 12:33:11 am »
Might be something around those lines indeed since I compile from the pseudo network sharing... but still, I don't have this error with GCC only.

I'm on to another technique now... I did compiled the SFML libraries statically and I'm trying to link them to my project using Cmake like so:

TARGET_LINK_LIBRARIES(mainLib "${PATH_DEP}libsfml-window-s.a")

and I get this error:

Undefined symbols for architecture x86_64:
  "_IOHIDValueGetIntegerValue", referenced from:
      sf::priv::HIDInputManager::isKeyPressed(sf::Keyboard::Key)    in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::isMouseButtonPressed(sf::Mouse::Button)    in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::JoystickImpl::update()    in libsfml-window-s.a(JoystickImpl.cpp.o)
  "_IOHIDElementGetDevice", referenced from:

___SNIPP

So I'm guessing this is the joystick handling but I don't know how to solve this or even from which framework it comes from.

Any chance someone could help me clear this up?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Compiling Window lib on OSX
« Reply #6 on: December 12, 2012, 09:25:25 am »
Well, SFML also relies on the IOKit so...

BTW, using static lib on Unixes is not the way to go.
SFML / OS X developer

 

anything