Theurgist
Theurgist

Reputation: 11

Qt with Visual Studio - cannot compile moved project

I have a project on Visual Studio 2010, which uses integration with Qt 4.8, some of boost features and all this stuff is versioned with SVN.

Everything was fine: I moved solution folder from one place to another, compiled it on different computers. But once I've renamed solution folder, and when I tried to build the project - compiler wrote only one error:

Error   1   error MSB6006: "cmd.exe" exited with code 1.    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets   151

But when I return old solution folder's name - everything builds without any errors again!

As i figured, compiler cannot use custom build steps for *.ui files and stops whole build process. Probably, there is some issue with absolute pathing, but I cannot find it second day :(

Upvotes: 0

Views: 856

Answers (2)

Theurgist
Theurgist

Reputation: 11

As it often happens, the answer was hiding right on the ground.

While observing build output I got lines like this:

1>  Uic'ing frmserver.ui...
1>  File 'C:\Users\Theurgist\Desktop\JamServer (?????)\JamServer\frmserver.ui' is not valid

This issue was all because Qt compiler tools can't work with unicode-containing paths correctly (at least up to version 4.8)

Upvotes: 1

Clare Macrae
Clare Macrae

Reputation: 3799

There must be some references to the old folder location in either your .sln file or your .vcxproj file(s).

You should be able to fix this by:

  • Closing Visual Studio
  • Opening your .sln file and all the .vcproj files it loads in a text editor of your choice
  • Doing a search-and-replace for the old folder name, changing it to the new folder name.

Upvotes: 0

Related Questions