gecube / opencaesar3

opencaesar3 fork from sourceforge
Other
139 stars 33 forks source link

Compiling in Mac OS #176

Closed nerijunior closed 11 years ago

nerijunior commented 11 years ago

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.

dalerank commented 11 years ago

Thanks... i will try fix this nearly

dalerank commented 11 years ago

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

nerijunior commented 11 years ago

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.

dalerank commented 11 years ago

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

nerijunior commented 11 years ago

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