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

Author Topic: iOS Build error, possible linking problem?  (Read 5319 times)

0 Members and 1 Guest are viewing this topic.

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
iOS Build error, possible linking problem?
« on: June 05, 2015, 12:10:33 am »
I am getting an error I believe to be a linking error, as I do not work with Xcode, or on mac very often I find it hard to debug errors there. If anyone could help me figure out what this error might be, that would be amazing.

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_CMMotionManager", referenced from:
      objc-class-ref in libsfml-window-s.a(SFAppDelegate.o)
ld: symbol(s) not found for architecture x86_64
 

Update:
After fiddling with it a little more, I think the problem has something to do with the Architectures I am using to build SFML and the ones I am using to build my project. I have tried every possible combination of them and nothing seems to work, I always get errors similar to the one above, maybe saying i386 instead of x86_64. Here is a screenshot of my settings page currently.


« Last Edit: June 05, 2015, 05:10:29 am by R23MJ »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: iOS Build error, possible linking problem?
« Reply #1 on: June 05, 2015, 07:51:03 am »
Isn't it just that you forgot to link to the CoreMotion framework?
Laurent Gomila - SFML developer

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: iOS Build error, possible linking problem?
« Reply #2 on: June 05, 2015, 12:27:20 pm »
That might just be it, excuse me for my lack of knowledge with developing with Xcode, (and for Mac/iOS) but is that something Apple provides? I just need to put "CoreMotion.framework" in my linked libraries and Xcode will handle its location? Or do I need to download it somewhere? Thank you for your help.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: iOS Build error, possible linking problem?
« Reply #3 on: June 05, 2015, 12:31:58 pm »
It's a standard framework, just select it in the list of your system frameworks in XCode. You may also have to do it with all the frameworks and external libs that SFML uses.
Laurent Gomila - SFML developer

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: iOS Build error, possible linking problem?
« Reply #4 on: June 05, 2015, 12:39:48 pm »
Thank you, you are a life saver, I have all the extlibs linked, is there a list of all the standard libraries SFML uses around here anywhere?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: iOS Build error, possible linking problem?
« Reply #5 on: June 05, 2015, 12:43:30 pm »
You'd need a list of the iOS dependencies, which is not available. So either do it with trial and error, or have a look at the dependencies of SFML directly in its Xcode projects.
Laurent Gomila - SFML developer

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: iOS Build error, possible linking problem?
« Reply #6 on: June 05, 2015, 01:29:30 pm »
I apologize for having to bother you again, but I pawed through the SFML project settings and cannot find the dependencies, besides window depends on system, and so forth. I did find a setting showing where the dependencies info.dat file was, but I searched and cannot find that file, "sfml-graphics-s_dependencies_info.dat" to be exact. Where exactly is this file in the SFML project?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: iOS Build error, possible linking problem?
« Reply #7 on: June 05, 2015, 01:47:19 pm »
The dependencies should appear directly in the left column in XCode. Sorry I can't help you more, I've stopped maintaining this port and I don't use XCode anymore.
Laurent Gomila - SFML developer

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: iOS Build error, possible linking problem?
« Reply #8 on: June 05, 2015, 02:21:11 pm »
Okay thank you, I figured it out I think. But now for some reason I get a blank screen on the simulator. I set my project up with the iOS game template, and I'm not sure what to do with the items provided from the template, the gameviewcontroller etc., also, where should I put my resources, I have tried just dragging them in the project, and even loading from an absolute directory, but nothing draws on screen.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: iOS Build error, possible linking problem?
« Reply #9 on: June 05, 2015, 03:23:52 pm »
Your code should look like a regular (desktop) C++ SFML project. Don't use any of the iOS templates available, this is totally unrelated. SFML already handles all the Objective-C iOS stuff.
Laurent Gomila - SFML developer

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: iOS Build error, possible linking problem?
« Reply #10 on: June 05, 2015, 03:33:08 pm »
What type of target do I need to create then, I made an empty project, but there is no empty target to add to my project, and without a target, it won't build.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: iOS Build error, possible linking problem?
« Reply #11 on: June 05, 2015, 03:40:56 pm »
I'm sorry but I haven't worked with XCode for a long time, and it was XCode 4 anyway so things have probably changed. You're on your own if you want to experiment with iOS.
Laurent Gomila - SFML developer

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: iOS Build error, possible linking problem?
« Reply #12 on: June 05, 2015, 03:44:17 pm »
Thanks anyways, I have a few things I am going to try.