I have Installed the Visual Studio Addin.
But I still got the same linker errors, and I turned on the /VERBOSE switch I can see that Qt5Cored.lib is marked as "unused library", which is strange because my test code is as follows.
#include <iostream>
#include <QtCore/QtCore>
using namespace std;
int main()
{
QString strPath2
= "D:/TestCDir/Tmp";
dir.setPath(strPath1);
if (!dir.exists())
dir.mkpath(strPath1);
dir.setPath(strPath2);
if (dir.count() == 0)
dir.rmpath(strPath2);
else
cout << dir.count() << endl;
dir.setPath(strPath1);
dir.rmpath(strPath1);
return 0;
}
#include <iostream>
#include <QtCore/QtCore>
using namespace std;
int main()
{
QString strPath1 = "D:/TestCDir";
QString strPath2 = "D:/TestCDir/Tmp";
QDir dir;
dir.setPath(strPath1);
if (!dir.exists())
dir.mkpath(strPath1);
dir.setPath(strPath2);
if (dir.count() == 0)
dir.rmpath(strPath2);
else
cout << dir.count() << endl;
dir.setPath(strPath1);
dir.rmpath(strPath1);
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks