Opened 10 years ago

Closed 10 years ago

#12300 closed build error (duplicate)

Trunk compilation w/ Visual Studio 2010

Reported by: avivahl Owned by:
Priority: normal Milestone:
Component: build Version: stable-latest
Keywords: compilations, vs2010 Cc:
Blocked By: Blocking:
Patch: no


  1. Checkout the latest trunk (currently 65140).
  2. Rename setup0.h to setup.h (in wxWidgets\include\wx\msw).
  3. Open wxWidgets\build\msw\wx_vc9.sln in Visual Studio 2010 and let it convert all 22 projects.
  4. Switch to "Release" configuration and try to build the solution. Result:

Build: 5 succeeded, 17 failed, 0 up-to-date, 0 skipped

Why 17 failed? Because they all fail w/ the exact same message:
22>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 message, of course, doesn't help at all. :)

When converting the projects, the custom build tool for setup.h (the "copy" command) is being converted in a bad way.

The "Additional Dependencies" line says: $(INTDIR) $(OUTDIR);%(AdditionalInputs)

Instead of saying: $(INTDIR);$(OUTDIR);%(AdditionalInputs)
(notice the semicolon on the second one)

Don't even ask how much time I wasted to find this out! :O

Workaround: copy the setup.h file manually and then build the solution (the IDE will simply skip the "custom build tool" step, cause the file is already copied).

Workaround 2 (better & easier one):

  1. Close the IDE.
  2. Open all .vcxproj files in Notepad++ or another editor.
  3. Search&Replace all "$(INTDIR) $(OUTDIR)" to "$(INTDIR);$(OUTDIR)"

(without the quotes)

  1. Reopen the solution and build it.

Proper solution (the reason I opened this ticket instead of submitting the info to the wiki): either extend Bakefile to generate good VS2010 solution/project-files OR find a way to generate VS2008 project files that convert correctly by VS2010.

I used "workaround 2" and everything builds correctly. Tested both "Release" and "Debug" configurations.

Avi Vahl.

Change History (2)

comment:2 Changed 10 years ago by neis

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.