Opened 10 years ago

Closed 9 years ago

#12010 closed build error (fixed)

Building with MSVC 2010 Express

Reported by: Stu Redman Owned by:
Priority: normal Milestone: 3.0.0
Component: build Version: stable-latest
Keywords: bakefile vc10 vs2010 Cc: Carsten
Blocked By: Blocking:
Patch: no

Description

Since MSVC 2010 Express edition is available now, I decided to give it a try. While 2.8.10 builds fine, with 2.9 SVN I experienced the same problems as stated in here:

C:\Program Files\MSBuild\Microsoft.Cpp
\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6001: Invalid
command line switch for "cmd.exe". The path is not of a legal form. 

The problem is caused by the custom build step to copy config.h. I played a bit with the newly created .vcxproj files and found a solution by editing the CustomBuild/AdditionalInputs entry:
Replace

>$(INTDIR) $(OUTDIR);%(AdditionalInputs)</AdditionalInputs>

with

>%(FullPath);%(AdditionalInputs)</AdditionalInputs>

(a full search&replace over all .vcxproj files works fine. This fixes the custom build step and the build.

It would probably be best to include ready solution+projects for VC10 in SVN.

By the way: it would be better to move this custom build step to a separate project and make the other projects depend on it. As it is now, there are collisions in a multi core build when several processes try to copy the file at the same time.

Cheers,
Stu

Change History (10)

comment:1 Changed 9 years ago by Casey

Open a cmd window
Navigate to vcvars32.bat
Run it
Navigate to makefile.vc
Make it
Voila! :)

comment:2 Changed 9 years ago by Casey

Open a cmd window
Run vcvars32.bat
Navigate to makefile.vc
Make it
Voila! :)

comment:3 Changed 9 years ago by triton

  • Status changed from new to confirmed

I'm hitting this problem, much thanks for the workarounds.

comment:4 follow-up: Changed 9 years ago by vadz

  • Keywords bakefile vc10 vs2010 added
  • Milestone set to 3.0
  • Patch unset

We really need to do something about this before 3.0. The trouble is that we really don't want to go back to maintaining the project files manually and bakefile isn't capable of generating VC10 files right now :-(

comment:5 Changed 9 years ago by cavancn

I am using VS2010 Premium and meet the same problem, somehow the workaround cannot work at all; is there VC10 ready solution mentioned above and where can I find it?

comment:6 in reply to: ↑ 4 ; follow-up: Changed 9 years ago by Carsten

  • Cc Carsten added

Replying to vadz:

The trouble is that we really don't want to go back to maintaining the project files manually and bakefile isn't capable of generating VC10 files right now :-(


Sorry for hijacking the opportunity, but would introducing CMake (or PreMake, or ...) besides Bakefile be an option? The downside of this would be that "officially", both Bakefiles and CMakefiles would have to be supported, so there is extra work involved, but it would solve this ticket and "document" the building of wxWidgets in a manner that is probably more accessible to most folks who are not intimate wit Bakefile.

comment:7 in reply to: ↑ 6 ; follow-up: Changed 9 years ago by vadz

Replying to Carsten:

Sorry for hijacking the opportunity, but would introducing CMake (or PreMake, or ...) besides Bakefile be an option?

No, this really doesn't make much sense. If we are ready to manually maintain something else than build/bakefiles/files.bkl we should just manually update the VC10 projects instead. And, in fact, it increasingly looks like this is what we'll have to do for 3.0.

Besides, how is using cmake with VC10 better than just using makefile.vc to build?

comment:8 in reply to: ↑ 7 Changed 9 years ago by Carsten

Replying to vadz:

Besides, how is using cmake with VC10 better than just using makefile.vc to build?


Well, of course one can use makefile.vc directly - I do, too.

But I was suggesting cmake because it can generate VC10 project files (the primary goal of this ticket), plus it brings all these nice "side effects", such as

  • all the other targets it supports,
  • easier integration if wxWidgets is to be built as part of an application build,
  • easier to understand/follow than Bakefiles (imho).

So assuming that maintaining VC10 project files and cmake files is roughly the same effort, you get more out of cmake at the same cost.

(I'm not a particularly strong proponent of cmake; imo any of cmake, premake, scons or waf can be used as well.)

comment:9 Changed 9 years ago by avivahl

This one can be finally closed. ;-)
Fixed by: http://trac.wxwidgets.org/changeset/66836/
Verified here w/ vs2010.

comment:10 Changed 9 years ago by vadz

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

Thanks for testing and the reminder!

Note: See TracTickets for help on using tickets.