Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile on Mac #33

Open
alexey-zaharchenko opened this issue Sep 4, 2014 · 5 comments
Open

Compile on Mac #33

alexey-zaharchenko opened this issue Sep 4, 2014 · 5 comments

Comments

@alexey-zaharchenko
Copy link

I add add_subdirectory (dfterm3-plugin) to the end of dfhack/plugins/CMakeLists.txt and try compile, but linker fails:

Linking CXX shared module dfterm3.plug.so
Undefined symbols for architecture i386:
"_SDL_PushEvent", referenced from:
_plugin_init in dfterm3.cpp.o
"___progname_full", referenced from:
__ZL15sendHandshakingRN6DFHack13color_ostreamEP13Dfterm3Client.clone.33 in dfterm3.cpp.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[2]: *** [plugins/dfterm3-plugin/dfterm3.plug.so] Error 1
make[1]: *** [plugins/dfterm3-plugin/CMakeFiles/dfterm3.dir/all] Error 2
make: *** [all] Error 2

@lethosor
Copy link
Contributor

lethosor commented Sep 5, 2014

If I remember correctly, you'll need to add a hook for SDL_PushEvent in library/Hooks-darwin.cpp (and possibly define _SDL_PushEvent as DFH_SDL_PushEvent on OS X).

@alexey-zaharchenko
Copy link
Author

I just noticed that I've created this issues not in plugin repository, I hope it is not so important.
After a while all successfully compiled and run, but for this I head to comment

char* result = realpath(__progname_full, realpath_result);
    if ( !result ) {
        return false;
    }

in sendHandshaking function for not win platform, I don't fully understand fort what this check, maybe somebody know?

@Noeda
Copy link
Owner

Noeda commented Sep 14, 2014

The if-check is there because the Linux man page for realpath() suggests that call can fail. It probably should print some kind of error though. I don't know in what circumstances it can fail but at the time I most likely was too lazy to find that out.

@lethosor
Copy link
Contributor

lethosor commented Oct 6, 2014

@daedmen could you share the code you used to get PushEvent working? It would be nice to merge that into the official DFHack repo, if possible.

@alexey-zaharchenko
Copy link
Author

Yes, I patch dfterm3-plugin for run it on macosx, and all was well with df/dfhack versions from beginning of September .But with current versions the link between dfterm3-plugin and dfterm3 broke and I have not yet figured out what the problem is, so i push as soon as all will be work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants