miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can't build python module (Win7-32, python2.7, mingw32)

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation
View previous topic :: View next topic  
Author Message
neorazorx



Joined: 14 May 2011
Posts: 3

PostPosted: Sat May 14, 2011 4:31 pm    Post subject: Can't build python module (Win7-32, python2.7, mingw32) Reply with quote

Hello, i can't compile python module on Windows 7 32 bits, python 2.7 and mingw32.

I can't post any log because i get this message:
You must have 1 posts before you can post URL's/Links.

I pasted here -> pastebin (dot) com (slash) wgWVVTFu
_________________
http://www.pystream.com
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1500

PostPosted: Sun May 15, 2011 9:17 pm    Post subject: Reply with quote

Code:
libminiupnpc.a(miniupnpc.o):miniupnpc.c:(.text+0x6f3): undefined reference to `GetBestRoute@12'

I think IPHLPAPI lib is missing from setupmingw32.py
Code:
     libraries=["ws2_32"],

should be
Code:
      libraries=["ws2_32", "iphlpapi"],


Thansk for the bug report
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1500

PostPosted: Sun May 15, 2011 9:58 pm    Post subject: Reply with quote

please try with miniupnpc-1.5.20110515.tar.gz
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
neorazorx



Joined: 14 May 2011
Posts: 3

PostPosted: Mon May 16, 2011 4:12 pm    Post subject: Reply with quote

Works! Thank you so much!

PS: I think that README file must mention the need of http://upx.sourceforge.net in order to compile under MinGW.
_________________
http://www.pystream.com
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1500

PostPosted: Mon May 16, 2011 4:23 pm    Post subject: Reply with quote

neorazorx wrote:
PS: I think that README file must mention the need of http://upx.sourceforge.net in order to compile under MinGW.

Yep, or detect upx is not available and not try to use it Wink
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
mj234



Joined: 27 Jan 2012
Posts: 3
Location: Denmark

PostPosted: Fri Jan 27, 2012 7:14 pm    Post subject: module request Reply with quote

ok, a have posted this in other post but here it is again:

could someone please provide a link for the python module?

i get this whe try to compile. it seems it uses an deprecated argument on gcc:

D:\Download\miniupnpc-1.6.20120125>setupmingw32.py build
running build
running build_ext
building 'miniupnpc' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Pytho
n27\PC -c miniupnpcmodule.c -o build\temp.win-amd64-2.7\Release\miniupnpcmodule.
o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1500

PostPosted: Sun Jan 29, 2012 9:46 pm    Post subject: Reply with quote

Why dont you try to remove that -mno-cygwin argument ?
google can be usefull sometimes :
http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
spootdev



Joined: 24 Jan 2012
Posts: 3

PostPosted: Tue Feb 07, 2012 12:23 am    Post subject: Reply with quote

edit C:\Python27\Lib\distutils\cygwinccompiler.py to remove the -mno-cygwin as this option is removed from newer mingw32's
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.