[Insight-users] compilation with MSVS 2005 64bit
Hugo Gratama van Andel
h.a.gratamavanandel at amc.uva.nl
Thu Sep 15 03:59:22 EDT 2005
Hi Ashish,
Thanks for your reply. I am working om the same platform, dual Xeon and
Windows XP x64. I can't give you the solution, but I can tell what I
tried (and isn't succesfull yet). Maybe we can figure out what options
are left.
Some tips and things I tried:
-To compile for 64-bit in Visual Studio 2005 Beta, the express edition
is not enough. The x64 platform is not included, so you have to get a
full version(Standard Editon or higher).
-When you are making use of CMake(2.0.6) to create your solution for
'Visual Studio 8 2005' you will get an error when you are not using the
express-edition because CMake will expect the executable vcexpress in
stead of the devenv for the higher editions. Manual choosing the right
program for the CMAKE_MAKE_PROGRAM variable will solve the problem for
that one run. You can also change the name for the expected program in
the CMakeVS8FindMake.cmake module file.
- At this moment I don't know how to specify in the CMake files (or the
gui) directly to target the x64 program. I posted this question on the
CMake mailing list and I got this reply:
" Changing any build settings from within the IDE will not work because
the next time CMake runs (possibly automatically during the build) it
will just overwrite the project files with the original settings.
Currently I don't think support is implemented in CMake for 64-bit
builds with Visual Studio. Please submit a feature request here:
http://www.cmake.org/Bug
Meanwhile you _might_ be able to get things working by using the 'NMake
Makefiles' generator (starting with an new empty build tree) and setting
the CMAKE_C_FLAGS* and CMAKE_CXX_FLAGS* variables in the cache (turn on
advanced view) to contain the proper flags for 64-bit builds. -Brad "
- I have not tried out the 'NMake Makefiles' generator but I will give
it a try.
- You can also specify the platform in Visual Studio (
Build->Configuration Manager->active solution platform->new->x64->OK )
BUT: Visual Studio 2005 needs aprox. one hour (!) to change the settings
from Win32 to x64 for the whole ITK project (probably due to a bug).
-I am working with the ITK 2.2 source from the CVS. When I tried an
earlier version of ITK, the Visual studio compiler gave a lot of errors
(due to old header styles or old declarations or ...?).
-The build of the solution made with CMake and adjusted to the x64
platform within Visual Studio resulted in at first god compilation and
halfway the build to compilation errors:
"Linker Tools Error LNK1112": module machine type X86 conflicts with
target machine type x64
-To overcome the above mentioned problem I have tried two things:
1) I thougth that Visual Studio maybe tried to link to some 32-bit
versions of some neccessary libraries e.g. Kernel32.lib. I downloaded
the Microsoft Platform SDK which can supply all the different versions
of the windows libraries for all platforms. Running the Build from the
'Windows XP 64-bit Build Environment' with all the correct include paths
set, however did not solve the problem.
2) The generated (and adjusted) solution still has some build options
specified that aren't for the x64 platform. In the CMAKE Gui I remove
all the options as: "/machine:I386" and "/WIN32" and tried to change
them in "/MACHINE:X64" and "/WIN64", without the desired effect.
If anybody sees some things I have done wrong or haven't tried yet
please let me know.
Thanks in advance,
Hugo Gratama van Andel
Ashish Poddar wrote:
> Hi,
>
> I recently download Visual Studio 2005 Beta, and also followed some
> online help for compiling a program on 64-bit machine. But I could not
> configure the necesary properties! If you can give me some tips for
> configuring Visual Studio 2005 for compiling 64-bit binary, I would
> really appreciate that.
>
> I am working on Dell Precision 670 based on 64-bit xeon processor with
> windowx xp64.
>
> with regards,
> Ashish.
>
> On 9/14/05, *Hugo Gratama van Andel * <h.a.gratamavanandel at amc.uva.nl
> <mailto:h.a.gratamavanandel at amc.uva.nl>> wrote:
>
> Is it already possible to compile ITK with the Visual Studio 2005 Beta
> and for the x64 platform? I tried it several times, but it would not
> succeed due to linker problems.
>
> Any help would be appreciated,
> Hugo Gratama van Andel
>
More information about the Insight-users
mailing list