from WIN32 to Win64 compile with visual c++ 2005 express

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

from WIN32 to Win64 compile with visual c++ 2005 express

Postby Engin Üstün » 05 Sep 2006, 03:46

Hi,
i tried some days ago with window x64 and visual c++ 2005 express edition to recompile my code of Tornado to x64 code to become hopefully some speedup, but do not see how to switch to the platform of x64.

somebody had also problems ?

or does it only work with the visual studio 2005 only ?

what is different form express edition ?
Engin Üstün
 
Posts: 15
Joined: 21 Jul 2005, 21:39
Location: Germany

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Tony van Roon-Werten » 05 Sep 2006, 09:27

Engin Üstün wrote:Hi,
i tried some days ago with window x64 and visual c++ 2005 express edition to recompile my code of Tornado to x64 code to become hopefully some speedup, but do not see how to switch to the platform of x64.

somebody had also problems ?

or does it only work with the visual studio 2005 only ?

what is different form express edition ?


I don't think the express version has a 64 bit compile option.

Tony
Tony van Roon-Werten
 
Posts: 99
Joined: 02 Oct 2004, 15:31
Location: 's Hertogenbosch, Netherlands

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Pradu » 05 Sep 2006, 10:03

Engin wrote:i tried some days ago with window x64 and visual c++ 2005 express edition to recompile my code of Tornado to x64 code to become hopefully some speedup, but do not see how to switch to the platform of x64.

64-bit compiles can be done for not only for VC2005 Express, but also all the way from VC6:

AMD's Guide
Building AMD64 applications with Microsoft Platform SDK

Microsoft's note about the Express Edition and 64-compilation:
How to: Configure Visual C++ Projects to Target 64-Bit Platforms
64-Bit Programming with Visual C++

Just google for some simple tutorials on how to setup 64 bit compilation with your Microsoft Compiler. There are plenty.
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Pedro Castro » 05 Sep 2006, 18:14

x64 Primer
Everything You Need To Know To Start Programming 64-Bit Windows Systems

http://msdn.microsoft.com/msdnmag/issue ... fault.aspx
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Engin Üstün » 05 Sep 2006, 21:53

thanks for hints,
but i tryed and seems not work in real 64 bit with express edition.
:(

i must use other 64 bit compilers like GCC or anything...

do you know other free 64 bit compiler ?
Engin Üstün
 
Posts: 15
Joined: 21 Jul 2005, 21:39
Location: Germany

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Pedro Castro » 06 Sep 2006, 02:43

You are in the certain thing :( Eugin, the compiler x64 comes with visual c++ 2005 Professional, neither in the version express neither standard.

http://en.wikipedia.org/wiki/Visual_C_Plus_Plus

At the end there is a section 64 bits that indicates this way it and I have also seen it in the microsoft guide.
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Pradu » 06 Sep 2006, 03:23

Quote from one of the links I posted above from Microsoft:
How to: Configure Visual C++ Projects to Target 64-Bit Platforms wrote:64-bit tools are not available on Visual C++ Express Edition by default. To enable 64-bit tools on Visual C++ Express Edition, install the .NET Framework SDK in addition to Visual C++ Express Edition. Otherwise, an error occurs when you attempt to configure a project to target a 64-bit platform using Visual C++ Express Edition.
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Bo Persson » 06 Sep 2006, 18:19

Pradu wrote:Quote from one of the links I posted above from Microsoft:
How to: Configure Visual C++ Projects to Target 64-Bit Platforms wrote:64-bit tools are not available on Visual C++ Express Edition by default. To enable 64-bit tools on Visual C++ Express Edition, install the .NET Framework SDK in addition to Visual C++ Express Edition. Otherwise, an error occurs when you attempt to configure a project to target a 64-bit platform using Visual C++ Express Edition.


Have you actually tried this and seen that it works?

You can't always trust the MS documentation, as they often write "Visual Studio" when they mean "Professional Edition". Some of their pages claim that the Standard Edition contains the x64 compiler, while other pages state that it does not.

Who knows?
Bo Persson
 
Posts: 5
Joined: 04 Aug 2005, 09:37
Location: Malmö, Sweden

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Pradu » 06 Sep 2006, 18:39

Bo Persson wrote:
Pradu wrote:Quote from one of the links I posted above from Microsoft:
How to: Configure Visual C++ Projects to Target 64-Bit Platforms wrote:64-bit tools are not available on Visual C++ Express Edition by default. To enable 64-bit tools on Visual C++ Express Edition, install the .NET Framework SDK in addition to Visual C++ Express Edition. Otherwise, an error occurs when you attempt to configure a project to target a 64-bit platform using Visual C++ Express Edition.


Have you actually tried this and seen that it works?

You can't always trust the MS documentation, as they often write "Visual Studio" when they mean "Professional Edition". Some of their pages claim that the Standard Edition contains the x64 compiler, while other pages state that it does not.

Who knows?


I have not tried this myself, but search online and look in some forum posts. Many people have been able to successfully. What I posted here were just some search results from google... I suppose this topic would not be necessary when you have google to play around with...
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Bryan Hofmann » 07 Sep 2006, 00:40

Engin Üstün wrote:Hi,
i tried some days ago with window x64 and visual c++ 2005 express edition to recompile my code of Tornado to x64 code to become hopefully some speedup, but do not see how to switch to the platform of x64.

somebody had also problems ?

or does it only work with the visual studio 2005 only ?

what is different form express edition ?


The express edition does not support 64 bit compiles.

http://msdn.microsoft.com/vstudio/produ ... fault.aspx


Bryan
Bryan Hofmann
 
Posts: 98
Joined: 02 Oct 2004, 20:26
Location: USA

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Maciej Pestka » 07 Sep 2006, 07:53

True, Express Edition alone does not support it.

BUT

Together with Microsoft Platform SDK (about 800 MB disk space) it can be used to compile programs in 64-bit mode. And it's free!

I compiled Matacz1.1_x64 this way (it played in the latest edition of ChessWar). You just have to setup new release configuration with paths to Platform SDK libraries.

look at:
http://msdn2.microsoft.com/en-us/library/9yb4317s.aspx
Best Regards
Maciej Pestka
Maciej Pestka
 
Posts: 6
Joined: 02 Oct 2004, 21:51

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Engin Üstün » 08 Sep 2006, 03:32

Hi,
i tryed all this and many of these but i never get a 64bit native exe file /it runs only in *32 mode .

the directories are allready... works also good with "windows.h" :)

i have downloaded windows x64 professional trial version, VC++ 2005 Express Edition and newest Platform SDK, Framework 2.0 and Framework 2.0 SDK with language pack, and i read many of microsoft helps, but nothing of that is true or works exactly who is writed.

can you help me with a example ?
Engin Üstün
 
Posts: 15
Joined: 21 Jul 2005, 21:39
Location: Germany

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Maciej Pestka » 08 Sep 2006, 09:22

Actually I have Microsoft Server 2003 Platform SDK (SP1) so it's probably not the newest one.
I don't really remmember it step by steb byt I'll try to help:
If you installed everythink needed then you have to:

Tools->Options->VC++ directories add:
executable:
$(VCInstallDir)PlatformSDK\bin
$(FrameworkSDKDir)bin
$(FrameworkDir)$(FrameworkVersion)

include files:
C:\Program Files\Microsoft Platform SDK\Include

library files:
C:\Program Files\Microsoft Platform SDK\Lib

exclude directories:
C:\Program Files\Microsoft Platform SDK\Include


(That's what I have at least)





- create new directory for this release
- create new Solution Configuration (Build->Configuration Manager)
- create new active solution platform
- choose copy setings from your WIN 32 Release config
- in Project->Project Properties:
- configuration properties
- C/C++
- preprocesor definitions I have: WIN64;NDEBUG;_CONSOLE
- output & precompiled headers: change to new release directory
so my command line looks like:
/O2 /Ob2 /Ot /Oy /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /GF /FD /EHsc /MT /Zp4 /GS- /Fp".\64_Release/Matacz.pch" /Fo".\64_Release/" /Fd".\64_Release/" /W3 /nologo /c /TP /errorReport:prompt

(/Zp4 is my struct alignment you will have different)

Linker:
- output: set proper release directory
- IMPORTANT: Advancet->targetMachine: not set
- IMPORTANT: comman line: Additional options: /MACHINE:AMD64


And now: close VC++ Express

Inside C:/Program Files/Microsoft Platform SDK/
create bat file (ex: vc64.bat) with path to VCExpress /useenv example:
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\VCExpress.exe" /useenv



Start->Programs->Microsoft Platform SDK->Open Build Enviroment window->Windows XP 64-bit Build Environment->... Retail

this will open command prompt with 64-bit enviroment setup correctly.

run yout batch file: vc64
it will start VC Express
open your project
build it (make sure to clean 64-bit release directory before)
Done!

Every time you want 64-bit exe then you have to start
VCExpress using Platform SDK environment & your batch.

Uffff... I hope this helps
Maciej
Best Regards
Maciej Pestka
Maciej Pestka
 
Posts: 6
Joined: 02 Oct 2004, 21:51

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Engin Üstün » 08 Sep 2006, 17:33

thank you very much !

i will to go try it now :)

best wishes,
Engin
Engin Üstün
 
Posts: 15
Joined: 21 Jul 2005, 21:39
Location: Germany

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Engin Üstün » 08 Sep 2006, 22:02

no way i get only errors !
dam express edition !!!

i can't believe that works for you with express edition, maybe on the stadard or profesional edition!

but this is to expensive to buy for me :(
Engin Üstün
 
Posts: 15
Joined: 21 Jul 2005, 21:39
Location: Germany

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Maciej Pestka » 09 Sep 2006, 12:45

No, I have only free Express edition and Platform SDK Microsoft Windows Server 2003 SP1 (both downloade from Microsoft webpage).
I remmember that I had also some problems compiling in 64-bit mode first time but thanks to Google I managed to do it.
I don't know what errors you get but you can try to post them to some visual C++ programing groups...

Maciej
Best Regards
Maciej Pestka
Maciej Pestka
 
Posts: 6
Joined: 02 Oct 2004, 21:51

Re: from WIN32 to Win64 compile with visual c++ 2005 express

Postby Engin Üstün » 17 Sep 2006, 00:02

Maciej Pestka wrote:I remmember that I had also some problems compiling in 64-bit mode first time but thanks to Google I managed to do it.
I don't know what errors you get but you can try to post them to some visual C++ programing groups...

Maciej


the problems are big list i can't posting here....

and i decide to waiting because i learned that the only compile to x64 is not enough, because the int is not a 32bit variable on x64, that is also a 64bit long and with *pointers i get possible problems.

at the moment it is better i make my engine ready for SMP first thats is very important for me, because i have a dual core system here and want use both processors.
Engin Üstün
 
Posts: 15
Joined: 21 Jul 2005, 21:39
Location: Germany


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 5 guests