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 

Errors building for Win7 64

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



Joined: 18 Jul 2016
Posts: 13

PostPosted: Mon Jul 25, 2016 1:23 am    Post subject: Errors building for Win7 64 Reply with quote

I tried to build on Win 7 64 bit for Win 64 bit using Visual Studio 2015 and msvc/upnpc-static.vcproj
At first I got error due to missing file miniupnpcstrings.h. Then I created it from the another post as
..
#ifndef __MINIUPNPCSTRINGS_H__
#define __MINIUPNPCSTRINGS_H__

#define OS_STRING "Windows/7.0.0000"
#define MINIUPNPC_VERSION_STRING "1.4"

#endif
and compilation succeded, but then I got an error due to miniupnpc.lib was missing (see below).

Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'Debug\miniupnpc.lib' upnpc-static ...miniupnpc-2.0\msvc\LINK 1

So I tried to build miniupnpc.lib using minGW-64 and Makefile.mingw . I install latest version minGW 6.1 x86_64. Added env. path C:\mingw\bin and C:\Program Files\mingw-w64\x86_64-6.1.0-win32-seh-rt_v5-rev0\mingw64\bin

but it failed:

upnpc-2.0>mingw32make.bat
cc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -DMINIUPNP_STATICLIB -c -o wingenminiupnpcstrings.o wingenminiupnpcstrings.c
process_begin: CreateProcess(NULL, cc -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501 -DMINIUPNP_STATICLIB -c -o wingenminiupnpc
strings.o wingenminiupnpcstrings.c, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile.mingw:56: recipe for target 'wingenminiupnpcstrings.o' failed
mingw32-make: *** [wingenminiupnpcstrings.o] Error 2

Since I could not build library I copied miniupnpc.lib,.dll from upnpc-exe-win32-20100513.zip you posted (Thanks!) to ..miniupnpc-2.0\msvc\Debug
Then VS2015 built failed with error
Severity Code Description Project File Line Suppression State
Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification upnpc-static ..miniupnpc-2.0\msvc\upnpc.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2026 module unsafe for SAFESEH image. upnpc-static ..miniupnpc-2.0\msvc\miniupnpc.lib(dotfs00017.o) 1 and bunch of similar errors

Did I copied files to wrong folder (DEBUG)?
Any suggestions?
Should there be Visual Studio project to build miniupnpc.dll/lib, why is minGW needed?


Thanks
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1448

PostPosted: Fri Jul 29, 2016 7:32 pm    Post subject: Reply with quote

I've never tried to use VS 2015 of win64 so I cannot tell what's wrong, i guess the project files need to be updated.

about MinGW, look at the error : I think "cc" is not the command to run the C Complier on your setup. set the CC var in Makefile.mingw to your C complier
_________________
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: 1448

PostPosted: Fri Jul 29, 2016 7:33 pm    Post subject: Re: Errors building for Win7 64 Reply with quote

yakovmotog wrote:
Should there be Visual Studio project to build miniupnpc.dll/lib, why is minGW needed?


you're welcome to add Visual studio project file to build whatever lib.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
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.