Fork me on GitHub
  November 19, 2018, 12:21:00 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: -rdynamic for plugins  (Read 5588 times)
Ben S.
Newbie
*
Posts: 25


View Profile
« 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
« Last Edit: December 22, 2010, 09:05:05 pm by Ben S. » Logged

Unofficial Mineserver builds:
http://www.benschro.com/mineserver
Fador
Administrator
Full Member
*****
Posts: 126


View Profile
« Reply #1 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..
Logged
Ben S.
Newbie
*
Posts: 25


View Profile
« Reply #2 on: December 23, 2010, 01:47:01 am »

I posted it here:
http://pastebin.com/J5PqSFy0

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.
Logged

Unofficial Mineserver builds:
http://www.benschro.com/mineserver
Ben S.
Newbie
*
Posts: 25


View Profile
« Reply #3 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.
Code:
ifeq ($(findstring MINGW32,$(SYSTEM)),MINGW32)
LFLAGS = -lws2_32 -lwinmm -export-all-symbols
else
LFLAGS = -rdynamic
endif

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.
Logged

Unofficial Mineserver builds:
http://www.benschro.com/mineserver
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!