Author Topic: Having trouble compiling in Xcode  (Read 1198 times)

Offline boozedog

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Having trouble compiling in Xcode
« on: June 15, 2016, 09:12:30 pm »
I used the instructions in README.md to install the dependencies (I'm using brew) and add the src folder.

When I build, I get the following error:

Code: [Select]
Undefined symbols for architecture x86_64:
  "_SDL_main", referenced from:
      -[SDLMain applicationDidFinishLaunching:] in SDLMain.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Offline Crazy Photon

  • Squaddie
  • *
  • Posts: 9
  • Resistance is NEVER Futile!
    • View Profile
Re: Having trouble compiling in Xcode
« Reply #1 on: June 15, 2016, 10:07:26 pm »
I don't know about Xcode, but if you have brew installed, you can get it to compile by following the steps from here:

https://www.ufopaedia.org/index.php/Compiling_with_brew_(OpenXcom)

I had to change line 36 of Makefile.simple to the following too:

Code: [Select]
CXXFLAGS += $(shell $(PKG-CONFIG) --cflags sdl yaml-cpp) -I/usr/local/Cellar/boost/1.60.0_2/include
« Last Edit: June 15, 2016, 10:10:05 pm by Crazy Photon »