Qt Project Name causing trouble
-
Hey guys,
I just stumbled upon a weird bug/problem and I want to know if this is a common issue or that I have missed some important information from Qt Documenation.
I've created a shared-library project called RemoteSystemBrowserModel. This project requires boost_system, so I've linked the corresponding library.
Whenever I compile this project I've get following error::-1: error: dependent '[my usr path]\boost_with_binaries\boost_1_67_0\boost\numeric\conversion\detail\preprocessed\numeric_cast_traits_long_long.hpp' does not exist.
Now the funny thing starts.
If I rename my RemoteSystemBrowserModel.pro to something that does not contain Remote like Test.pro or even like TestRemot.pro without an e. Than it compiles and works fine.Has someone experienced something similar? What can cause this behaviour? Have I missed some important naming guidelines?
Cheers and happy coding!
Franco -
Hi,
Never have got that use case...
What version of Qt are you using ? -
@SGaist said in Qt Project Name causing trouble:
Never have got that use case...
Then you're lucky and don't have to work on Windows. There is still the path length limitation to 260 characters unless you're using the '\?' prefix. See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#maximum-path-length-limitation
But I don't know if all qt tools support this path notation.
-
I'm usting the latest Qt Version 5.11.1 with msvc 2017 64.
@Christian-Ehrlicher thank you for pointing this out to me. I didn't know this limitation in windows. But for me the problem exists even with a path smaller than 260 characters.
For now I'm just not using remote in my project names. But it is still very strange and I can't really pin point something out which may cause problem. -
@framet said in Qt Project Name causing trouble:
But it is still very strange and I can't really pin point something out which may cause problem.
The problem is a (include) path which is longer than 260 chars somewhere in your generated Makefile
-
@Christian-Ehrlicher ah okey will check that. Thank you very much!
-
What version of Qt are you using ?
-
I've made other tests this morning. It has nothing to do with the name Remote rather with the naming length of the .pro file.
As @Christian-Ehrlicher already mentioned it has probably to do with path length. I've copied the boost_library folder directly into C:\ and now it works with longer names of the .pro file aswell.
I was unable to locate the exact path in the makefile which could let to not working or exciding 260 characters path length.
Maybe some Qt Guru can make a little script which will check the Makefile on Windows to prevent this kind of errors?Best regards
FrancoEdit: When using shadow build the path gets significantly longer than the project name.
Exp.:
(20 Characters)TestRemoteTestRemote
will be in the folder
(65 Characters)build-TestRemoteTestRemote-Desktop_Qt_5_11_1_MSVC2017_64bit-Debug
-
Glad you found out and thanks for the feedback !
That's a default setting, you can change it in Qt Creator.