Welcome! Log In Create A New Profile

Advanced

Visual Studio 2010 Fix

Posted by Anonymous User 
Anonymous User
Visual Studio 2010 Fix
May 24, 2010 01:43PM
On the latest commit the comment:
"Initial commit of MSVS 2010 project files. Note that due to a bug in the
Windows SDK v7.0A and v7.1 you will need to modify a couple of the include files
to get PeerBlock Release Vista builds to compile."

Would you be able to tell me how to do this as I just upgraded to Visual Studio 2010 and would like to get peerblock compiling with it.

Im fairly competent (at least I think I am) if you could just tell me which files, and what modifications to make to them I should be able to figure it out. No step by step guide on how to open Visual Studio needed... I hope.

Thanks a TON.
Anonymous User
Re: Visual Studio 2010 Fix
May 24, 2010 01:45PM
Oh yeah do I need both 7.0A and 7.1 installed? At the moment I have just 7.1. But if you could let me know what modifications to make for either one that would be nice.

Thanks.
Re: Visual Studio 2010 Fix
May 24, 2010 03:13PM
avatar
When VS 2010 complains about the fwptypes.h file, just make sure that blank lines after the last \ is removed after a few of the #define's.

so


#define FWP_ACTION_NONE \

(0x00000007)



becomes


#define FWP_ACTION_NONE \
(0x00000007)


It shouldn't be much harder than that. You need admin privileges if your on Vista or above.
Anonymous User
Re: Visual Studio 2010 Fix
May 25, 2010 02:11AM
After doing that I still get these warnings and errors:

list.cpp
8>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\algorithm(32): warning C4172: returning address of local variable or temporary
8> src\compact_list.cpp(65) : see reference to function template instantiation '_Fn1 std::for_each(_InIt,_InIt,_Fn1)' being compiled
8> with
8> [
8> _Fn1=add_pred &,
8> _InIt=p2p::compact_list::range_type *
8> ]
8> list_p2b.cpp
8> list_p2p.cpp
8>Lib:
8> libp2p.vcxproj -> C:\Users\jsday187\Subversion\peerblock\peerblock-read-only\build\windows\x64\Release\libp2p.lib

10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(369): error C2059: syntax error : 'constant'
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(371): error C2143: syntax error : missing ';' before '{'
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(371): error C2447: '{' : missing function header (old-style formal list?)
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(390): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(418): error C2146: syntax error : missing ';' before identifier 'v4Statistics'
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(418): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(418): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(419): error C2146: syntax error : missing ';' before identifier 'v6Statistics'
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(419): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
10>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iketypes.h(419): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
10>
10>Build FAILED.
10>
10>Time Elapsed 00:00:16.21
========== Build: 9 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Edited 2 time(s). Last edit at 05/25/2010 02:24AM by jsday187.
Anonymous User
Re: Visual Studio 2010 Fix
May 25, 2010 02:28AM
Ok I figured out I had to edit a space out of iketypes.h too. So it builds now. Thanks.

I still get this warning on the building of libp2p though in case you're interested:

8>------ Build started: Project: libp2p, Configuration: Release x64 ------
8>Build started 25/05/2010 1:19:49 AM.
6> hugehelp.c
8>InitializeBuildStatus:
8> Creating "x64\Release\libp2p.unsuccessfulbuild" because "AlwaysCreate" was specified.
8>ClCompile:
8> stdafx.cpp
6> if2ip.c
6> imap.c
6> inet_ntop.c
6> inet_pton.c
6> krb4.c
6> krb5.c
6> ldap.c
6> llist.c
6> main.c
6> md5.c
6> memdebug.c
6> mprintf.c
6> multi.c
6> netrc.c
6> nonblock.c
6> nss.c
6> nwlib.c
6> nwos.c
6> os-specific.c
6> parsedate.c
6> pingpong.c
6> pop3.c
6> progress.c
6> qssl.c
6> rawstr.c
6> rtsp.c
6> security.c
6> select.c
6> sendf.c
6> share.c
6> slist.c
6> smtp.c
6> socks.c
6> socks_gssapi.c
6> socks_sspi.c
6> speedcheck.c
6> splay.c
6> ssh.c
6> sslgen.c
6> ssluse.c
6> strdup.c
6> strequal.c
6> strerror.c
6> strtok.c
6> strtoofft.c
6> telnet.c
6> tftp.c
6> timeval.c
6> transfer.c
6> url.c
6> urlglob.c
6> version.c
6> warnless.c
6> writeenv.c
6> writeout.c
8> compact_list.cpp
8> list.cpp
8>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\algorithm(32): warning C4172: returning address of local variable or temporary
8> src\compact_list.cpp(65) : see reference to function template instantiation '_Fn1 std::for_each(_InIt,_InIt,_Fn1)' being compiled
8> with
8> [
8> _Fn1=add_pred &,
8> _InIt=p2p::compact_list::range_type *
8> ]
8> list_p2b.cpp
8> list_p2p.cpp
8>Lib:
8> libp2p.vcxproj -> C:\Users\jsday187\Subversion\peerblock\peerblock-read-only\build\windows\x64\Release\libp2p.lib
8>FinalizeBuildStatus:
8> Deleting file "x64\Release\libp2p.unsuccessfulbuild".
8> Touching "x64\Release\libp2p.lastbuildstate".
8>
8>Build succeeded.
8>
8>Time Elapsed 00:00:22.76
Anonymous User
Re: Visual Studio 2010 Fix
May 25, 2010 02:44AM
There's a 267Kb difference in size between 2008 and 2010 for peerblock.exe and a 1Kb size difference for pbfilter.sys
2010 being the smaller for both. More efficient or something? I guess they use different compilers, and builds of the same thing always differ when built with another compiler.
Re: Visual Studio 2010 Fix
May 25, 2010 02:48AM
avatar
2010 is a better compiler and is suppose to be more efficient but it shouldn't make too much difference.


Haven't looked too much into the warning but it doesn't seem too serious and it works if you disable warnings.
Re: Visual Studio 2010 Fix
May 30, 2010 01:30PM
IIRC you cannot even use Win SDK v7.1 with MSVS2010 even if you set it as the default SDK. So it will still use v7.0A. I currently use MSVS2008 with SDK v7.1 on my main machine, but the procedure is the same until MS decides to fix those empty lines.
The MSVS2010 executable should be faster although I have done any benchmarks. This is what it "feels" like.
Anonymous User
Re: Visual Studio 2010 Fix
October 16, 2010 05:13PM
So if building r488 or above make sure to edit the #define 's in fwptypes.h and the #define in iketypes.h in your SDK7.1 folder.

Make sure not to miss lines 336 and 338 on fwptypes.h too.
Sorry, only registered users may post in this forum.

Click here to login