ness | Jul 20, 2014 11:02 pm |
---|---|
Subject: For DEV: Compilation with MSVC2013 [Note: can't create the thread in dev section, admin may move this] Hi all, Great job with git migration, it is really fun to use I just had a small problem that I wanted to ticket; when i compiled againqt MSVC2013 (on Windows 8.1) (menu_event_refactoring branch, commit de7b04e9c9ec790a4b0a53a4e5ba33deab287040) In settings.cpp: "SHGetFolderPath" is deprecated (VS2013) replaced by SHGetKnownFolderPath that is only supported from VISTA I simply skip this out of my build and everything else was fine But maybe we should have a better patch |
alzi | Jul 21, 2014 12:50 pm |
---|---|
Subject: Re: For DEV: Compilation with MSVC2013 I do compile with VS2013 on Windows 8.1 as well and it works without problems here (I do not even get a warning). You are right that "SHGetFolderPath" is deprecated, but it should still be available for backwards compatibility. The documentation says for Vista and higher it is just a wrapper around "SHGetKnownFolderPath". The documentation for "SHGetKnownFolderPath" says that the minimum client version is Vista, so if I understand it correctly the binary will not work any longer on Windows XP if we use that function. Since I do not have an XP PC, I can not test that (would need to set up a VM for that). So I'm not sure what the best solution would be. I have not very much experience with cross platform home directory stuff. Maybe can use an environment variable, just like we do for linux. "%USERPROFILE%" should be the right one, but I do not know how robust this solution would be. |
ness | Jul 21, 2014 8:47 pm |
---|---|
Subject: Re: For DEV: Compilation with MSVC2013 I get a link error : DownloadSource code (C++):
Maybe i miss some libs in the link step ? |
alzi | Jul 21, 2014 9:27 pm |
---|---|
Subject: Re: For DEV: Compilation with MSVC2013 Hm, strange. It should be in "Shell32.lib" and that should be a default library. You may want to check whether it has been removed from there for some reasons. btw: do you have set up an own project for VS or do you use the one I uploaded to the mk/vs folder? Have you tried to compile the master instead of the branch? (there is the same function call to "SHGetFolderPath" in there) |
ness | Jul 22, 2014 10:03 am |
---|---|
Subject: Re: For DEV: Compilation with MSVC2013 I made my own project file from QtCreator, it should come from there, I'll try the VS project .. |
alzi | Jul 22, 2014 11:26 am |
---|---|
Subject: Re: For DEV: Compilation with MSVC2013 Oh I think I read somewhere that QtCreator is not adding all the default windows libraries, so maybe just adding Shell32.lib to your linker command will do the trick. |
ness | Jul 22, 2014 2:11 pm |
---|---|
Subject: Re: For DEV: Compilation with MSVC2013 You are correct, it was missing Thanks |