#15568 closed enhancement (fixed)

Provide x64 configurations in MSVS 10 projects

Reported by: arondobos Owned by:
Priority: normal Milestone: 3.0.0
Component: build Version: 3.0.0-rc1
Keywords: 3.0.0rc1, visual studio 2012 express, x64 Cc:
Blocked By: Blocking:
Patch: no

Description

I am testing the 3.0.0 RC1 with Visual Studio 2012 Express on Windows 7 64 bit. I open build/msw/wx_vc10.sln, upgrade to v110, create a new platform "x64" (enable 'Copy settings from Win32'), and build both debug and release builds. Everything compiles fine, but the libraries are left in C:\wxWidgets-3.0.0-rc1-x64\build\msw\x64\Release instead of the C:\wxWidgets-3.0.0-rc1-x64\lib\vc_lib folder.

Thus, the sample projects and related don't compile (cannot find wx/setup.h) and probably wouldn't link correctly either. This was not a problem in 2.9.5 and earlier SVN versions.

Change History (7)

comment:1 Changed 13 months ago by vadz

These projects are manually maintained, so whatever may be fixed in them, can/should be done by hand in the IDE. It would be great if someone could try doing it...

comment:2 follow-up: Changed 13 months ago by arondobos

This problem was introduced in #74718. I agree with the intention of the change in that update to use $(OutDir) in the project files, but when switching to x64, Visual Studio doesn't copy over the output directory specified in the Win32 configuration (..\..\lib\vc_lib\), and uses instead $(SolutionDir)$(Platform)\$(Configuration)\. Thus, now having all the libraries output to $(OutDir)\wxmsw30u_adv.lib instead of ..\..\lib\vc_lib\wxmsw30u_adv.lib explicitly breaks the builds.

My strong recommendation would be to revert the changes in #74718 as it really complicates switching to a 64 bit build. I don't see an obvious way to manually work around this in the project files because VS doesn't preserve the project level output folder when switching platforms.

comment:3 Changed 13 months ago by arondobos

Sorry I used the wrong syntax above: revision [74718]

comment:4 Changed 13 months ago by God_Mark

I recommend using property sheets for global build rules that should apply to all projects and platforms.
Something like output_dirs.props :

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup Label="UserMacros" />
<PropertyGroup>

<OutDir>$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\_builds\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>

</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />

</Project>

Its easy to customize and you avoid having to set the same settings in all the projects.

They even support a basic "condition" system so you could do something like:

<OutDir Condition="'$(Platform)' == 'Win32'">$(SolutionDir)\win32Folder\$(Configuration)\</OutDir>
<OutDir Condition="'$(Platform)' == 'x64'">$(SolutionDir)\Some Other Folder\$(Configuration)\</OutDir>

comment:5 in reply to: ↑ 2 Changed 13 months ago by vadz

Replying to arondobos:

This problem was introduced in #74718. I agree with the intention of the change in that update to use $(OutDir) in the project files, but when switching to x64, Visual Studio doesn't copy over the output directory specified in the Win32 configuration (..\..\lib\vc_lib\), and uses instead $(SolutionDir)$(Platform)\$(Configuration)\.

I'm confused by this as r74718 was done exactly in order to allow building in 64 bits easier, see #15439. But of course you need to change OutDir in the solution configuration to something appropriate...

Anyhow, I think the best solution would be to add 64 bit configurations to VC10 project files, as long as they're maintained manually anyhow, we could have them in it too. Would anyone be ready to do this, i.e. add 64 bit configurations, and submit the appropriate patches please?

TIA!

comment:6 Changed 13 months ago by vadz

  • Status changed from new to confirmed
  • Summary changed from 3.0.0 RC1 x64 build doesn't place compiled libraries in lib/vc_lib to Provide x64 configurations in MSVS 10 projects
  • Type changed from defect to enhancement

I don't even see the problem to be honest... I just added x64 platform to the existing solution and I see /OUT:"..\..\lib\vc_lib\wxmsw30ud_core.lib" /NOLOGO in the "Librarian|Command Line" options (and, of course, the output directory under "General" is correct too). I suspect you hit some MSVS bug.

But it would still be better to have x64 configs in the projects directly, if only because we could have the correct vc_x64_lib directory in them.

Unfortunately I think this can only be done manually. If anybody could do this or if anybody knows how to achieve this in some better way, e.g. with the property sheets, please do submit your changes. TIA!

comment:7 Changed 12 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [75079]) Add x64 platform to MSVS 10 solution and project files.

Manually update VC10 projects to have both Win32 and x64 architectures, use
"vc_x64" for the output directories and the DLL names under the latter.

Closes #15568.

Note: See TracTickets for help on using tickets.