compiling 0.50 on mac

66 views
Skip to first unread message

aaak

unread,
Sep 26, 2015, 7:13:30 AM9/26/15
to CorsixTH Development
An update for the Mac compilation instructions (https://github.com/CorsixTH/CorsixTH/wiki/Compiling-on-OS-X): I found it necessary to specify XCode's C++ dialect as C++11. Otherwise it can't find cstdint.

A problem that I haven't been able to solve: in sdl_audio.cpp, line 215,

SDL_CreateThread(load_music_async_thread, "music_thread", async);

causes the error, No matching function for call to 'SDL_CreateThread'


The candidate function identified is in sdl_thread.h:

extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data);



In case it's relevant — I'm compiling with XCode 6.2 on OS X.9.5.


Stephen E. Baker

unread,
Sep 29, 2015, 9:57:28 AM9/29/15
to corsix...@googlegroups.com
You should be able to update the wiki to add the note about C++11. It
would be even better if it could be made part of the CMakeList script.

I know tobylane was either able to work around or didn't encounter the
SDL_CreateThread issue. He is frequently in the #corsix-th irc channel.
Following https://github.com/CorsixTH/CorsixTH/pull/771 may help,
because tobylane was able to compile for personal use - it was packaging
dependencies that he ran into trouble with.

Good Luck!
> --
> You received this message because you are subscribed to the Google
> Groups "CorsixTH Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to corsix-th-de...@googlegroups.com
> <mailto:corsix-th-de...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

maximilli...@gmail.com

unread,
Oct 27, 2015, 9:24:42 AM10/27/15
to CorsixTH Development
Compiles fine for me on 10.11 El Capitan, but when executed I get an error: 

An error has occurred in CorsixTH:
cannot open CorsixTH.lua: No such file pr directory
stack traceback:
[builtin#2]: at 0x010d6091b0
[C]: at 0x010d3f2020

All dependencies are present and compiled without error. 

Xcode Version 7.1 (7B91b)
CMake 3.4.0-rc2

Stephen E. Baker

unread,
Oct 27, 2015, 11:13:47 AM10/27/15
to corsix...@googlegroups.com
That reads like CorsixTH.lua (and likely the Lua folder and other
resources) weren't in the expected search path.

Take a look at
https://github.com/CorsixTH/CorsixTH/blob/3fa9047187b03af7dba8215c8b7b82eb03e2fa53/CorsixTH/Src/main.cpp#L145

The above logic seems to be an ongoing issue for Linux and OSX packagers
(https://github.com/CorsixTH/CorsixTH/issues/144), but you should be
able to get it working in it's current state by putting the files in the
expected place.

Stephen E. Baker

On 2015-10-27 9:24 AM, maximilli...@gmail.com wrote:
> Compiles fine for me on 10.11 El Capitan, but when executed I get an
> error:
>
> /An error has occurred in CorsixTH:/
> /cannot open CorsixTH.lua: No such file pr directory/
> /stack traceback:/
> /[builtin#2]: at 0x010d6091b0/
> /[C]: at 0x010d3f2020/
>
> All dependencies are present and compiled without error.
>
> Xcode Version 7.1 (7B91b)
> CMake 3.4.0-rc2
>
> On Tuesday, 29 September 2015 15:57:28 UTC+2, Stephen E. Baker wrote:
>
> You should be able to update the wiki to add the note about C++11. It
> would be even better if it could be made part of the CMakeList
> script.
>
> I know tobylane was either able to work around or didn't encounter
> the
> SDL_CreateThread issue. He is frequently in the #corsix-th irc
> channel.
> Following https://github.com/CorsixTH/CorsixTH/pull/771
> <https://github.com/CorsixTH/CorsixTH/pull/771> may help,
> because tobylane was able to compile for personal use - it was
> packaging
> dependencies that he ran into trouble with.
>
> Good Luck!
>
> On 2015-09-26 7:13 AM, aaak wrote:
> > An update for the Mac compilation instructions
> > (https://github.com/CorsixTH/CorsixTH/wiki/Compiling-on-OS-X
> <https://github.com/CorsixTH/CorsixTH/wiki/Compiling-on-OS-X>): I
> found
> > it necessary to specify XCode's C++ dialect as C++11. Otherwise it
> > can't find cstdint.
> >
> > A problem that I haven't been able to solve: in sdl_audio.cpp,
> line 215,
> >
> > SDL_CreateThread(load_music_async_thread, "music_thread", async);
> >
> > causes the error, No matching function for call to
> 'SDL_CreateThread'
> >
> >
> > The candidate function identified is in sdl_thread.h:
> >
> > extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL
> > *fn)(void *), void *data);
> >
> >
> >
> > In case it's relevant — I'm compiling with XCode 6.2 on OS X.9.5.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "CorsixTH Development" group.
> > To unsubscribe from this group and stop receiving emails from
> it, send
> > an email to corsix-th-de...@googlegroups.com <javascript:>
> > <mailto:corsix-th-de...@googlegroups.com <javascript:>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "CorsixTH Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to corsix-th-de...@googlegroups.com
> <mailto:corsix-th-de...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages