Mineserver Community

Mineserver => Development => Topic started by: Ben S. on December 22, 2010, 08:59:51 pm

Title: -rdynamic for plugins
Post by: Ben S. on December 22, 2010, 08:59:51 pm
I think for windows this switch needs to be changed to -export-all-symbols.  -rdynamic only applies to ELF, not PE.

Also, since the function timeGetTime() is being used, on windows you need to also link -winmm.  I imagine anyone who builds for windows has already figured this out.

And another also, the makefile could also look for pdcurses, not just ncurses.

Edit:  I use mingw btw

Title: Re: -rdynamic for plugins
Post by: Fador on December 23, 2010, 12:51:46 am
well if you got it working, could you provide us a working Makefile for mingw? =)

We could add it as Makefile.mingw or something..

Title: Re: -rdynamic for plugins
Post by: Ben S. on December 23, 2010, 01:47:01 am
I posted it here:

2 things to note:
I'm not with the best with makefiles, but my uname with msys returns MINGW_NT-6.1.  I'm not sure how I could make this work for multiple versions for mingw: MINGW*

If someone has pdcurses instead of ncurses on their system, they can use make like this:
make pdcurses=true

I also reordered the linking to be done after the object files on the command line because mingw needs to know all of the symbols beforehand.

Take a look and let me know if i goofed anything up.

Title: Re: -rdynamic for plugins
Post by: Ben S. on December 25, 2010, 03:38:43 am
Here is another change you should probably make to the Makefile (I know, I should just create a fork, but I don't really have enough time to commit to this project unfortunately).

The way I had it before would only recognize mingw on windows 7.  I saw your use of findstring and adapted it.
ifeq ($(findstring MINGW32,$(SYSTEM)),MINGW32)
LFLAGS = -lws2_32 -lwinmm -export-all-symbols
LFLAGS = -rdynamic

This looks to me like it will work for different versions of mingw in theory.  Thanks again for accepting my changes.  It got rather tedious to fix it every time.