gecube/opencaesar3

Compiling in Mac OS

Closed this issue · 5 comments

Hello, I'm trying to build the project on Mac OsX 10.8.4 Mountain Lion, all libs are installed correctly (following the INSTALL_LINUX), the cmake output:

cmake ./
SDL_INCLUDE_DIR is /usr/local/include/SDL
-- Found LibArchive: /usr/lib/libarchive.dylib
-- Looking for dgettext
-- Looking for dgettext - not found
-- Found Libintl: /usr/local/include
-- Found ZLIB: /usr/include
-- Found PNG: /usr/local/lib/libpng.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/.../_dev/Games/opencaesar3

At this point, everything is ok, but on make I have 2 errors:
1 -

/Users/.../_dev/Games/opencaesar3/oc3_scopedptr.hpp:29:34: error: invalid application of 'sizeof' to an incomplete type 'Farm::Impl'
                typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];
                                               ^~~~~~~~~

2 -

/Users/.../_dev/Games/opencaesar3/oc3_scopedptr.hpp:29:34: error: invalid application of 'sizeof' to an incomplete type 'Temple::Impl'
                typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];

Both errors want the destructor in both classes, but all destructor is set.

I'm beginner with cpp so take it easy :)
Thanks.

Thanks... i will try fix this nearly

Ok... try add destructors to class Farm adn Temple, i dont known many about macos, may be compiler not create those automatically.

Done! All errors resolved, but now the release is not finding the resources dir, in stdout.txt have:

init graphic engine
init sound engine
load wait images begin
RESOURCE IS: /resources/locale
reading image archive: /resources/pics/pics_wait.zip
FATAL ERROR: Cannot open archive /resources/pics/pics_wait.zip

The /resources is from where the caesar3 binary is or the root of unix system?
The 'RESOURCE IS: /resources/locale' is from my authorship.

You can download ready for using resources from wiki (https://www.dropbox.com/s/xp3101bw5i4ltq1/resources.7z) and unpack it... if binary and resources stay in different locations use "-R /path/to/resources" cmd parametr, forexample "./caesar3 -R ./resources" it say to app, that resources in folder placed with binary

Good! Everything working great! Thanks a lot, now I'll study to translate some strings first to after change something in game.