ciplogic / fheroes2enh

Free Heroes 2 - Enhanced
Other
133 stars 19 forks source link

Mac OS High Sierra Compile Errors #4

Closed novice87 closed 6 years ago

novice87 commented 6 years ago

Firstly thank you working for enhance version 👍! I tried to build it in Mac OS X High Sierra(10.13.3) with SDL 1.2.15(installed by brew), copied Data and Maps dirs from original HOMM II, and it succeeded:

[100%] Linking CXX executable fheroes2 [100%] Built target fheroes2

although with some warning(overridden virtual function is here), not a big deal I though :)

then I try to open in terminal(./fheroes2) and it show these errors:

00:14:23: [ERROR] open: Couldn't open fheroes2.bin 00:14:23: [ERROR] open: Couldn't open fheroes2.bin 00:14:23: [ERROR] open: Couldn't open fheroes2.bin 00:14:23: [ERROR] open: Couldn't open fheroes2.bin 00:14:23: [ERROR] SetLangEnvPath: translation not found: en.mo libc++abi.dylib: terminating with uncaught exception of type Error::Exception [1] 94582 abort ./fheroes2

00:14:23: [ERROR] SetLangEnvPath: translation not found: en.mo

Fixed this by change fr lang in cfg file, I think it should load en language by default?

> 00:14:23: [ERROR] open: Couldn't open fheroes2.bin I searched it in original HOMM II files, but no luck. so where I can get fheroes2.bin file?

Im not not good at the compile jobs, but love this game. Thanks!

Updated:

Using CLion to build the project, "Couldn't open fheroes2.bin" error disappear. And show this:

fheroes2(4899,0x7fff94593340) malloc: *** mach_vm_map(size=140414087675904) failed (error code=3) error: can't allocate region set a breakpoint in malloc_error_break to debug libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc

ciplogic commented 6 years ago

Hi, so let's start with first part:

The error simply states that it cannot allocate memory... with a huge size as parameter. Not sure it is useful to now that if you allocate few thousands of GB, the Mac OS cannot or doesn't want to allocate it

ciplogic commented 6 years ago

The "files" folder is here: https://github.com/ciplogic/fheroes2enh/tree/master/files

novice87 commented 6 years ago

Thanks @ciplogic.

I think fheroes2.bin should be the compiled fheroes2 files, not sure why changed into fheroes2.bin by using make command compile in terminate.

Anyway I will switch to Windows to compile using Visual Studio later. And try to study c++ and compile commands later. :)

ciplogic commented 6 years ago

@novice87 I tested the build on Mac many times, but on Windows, if you simply don't want to bother to compile, I make from time to time installers.

You can take them from here: https://github.com/ciplogic/fheroes2enh/releases

novice87 commented 6 years ago

@ciplogic Thank you very much. Actually I don't wanna the installer, I want to build it by my self to learn the code for game development :). maybe you can show me the environment and the compile details.

ciplogic commented 6 years ago

So I could compile it... on OS X, so I will close the bug.