XCode SDL2 build error

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
cjcook
Posts: 3
Joined: January 29th, 2022, 2:36 am

XCode SDL2 build error

Post by cjcook »

Hi folks,
Downloaded XCode 13.2.1 and Wesnoth source code 1.16.2 (master)

Intending to build 'The Battle For Wesnoth' target.
Added my signing credentials and tried to build, and got this error:

.../wesnoth/src/sdl/surface.hpp:19:10: 'SDL2/SDL.h' file not found

The libSDL2 libraries are definitely specified as link libraries.

Any thoughts on this?

Thanks,
Chris
User avatar
Pentarctagon
Project Manager
Posts: 5531
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: XCode SDL2 build error

Post by Pentarctagon »

Are you using the Fix_Xcode_Dependencies script?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
cjcook
Posts: 3
Joined: January 29th, 2022, 2:36 am

Re: XCode SDL2 build error

Post by cjcook »

No, I was ignoring the packaging steps because it says "When compiling Wesnoth for an official release", and I'm just trying to build a .app file for local use.

But it looks like the section "Packaging - Packages preparation" probably applies to what I'm trying to do as well.
User avatar
Pentarctagon
Project Manager
Posts: 5531
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: XCode SDL2 build error

Post by Pentarctagon »

The name is a bit misleading, but that's what will build/download the required libraries for Wesnoth. You can see how it's done on the command line for the CI jobs at https://github.com/wesnoth/wesnoth/blob ... s/macos.sh
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
cjcook
Posts: 3
Joined: January 29th, 2022, 2:36 am

Re: XCode SDL2 build error

Post by cjcook »

Thanks, that definitely did the trick.
Post Reply