R
Robert190
Guest
I have a number of projects on a git server that I can download, build and run without issue on a number of PCs. However if I download or copy one of these projects to a USB drive, it will compile but generates exceptions when run. Sometimes it crashes immediately, sometimes projects will run for a while and then crash. Additionally, VS always wants to rebuild the project.
I don't believe the USB drives are at fault here. After downloading the source to the C drive and a USB drive, WinMerge reports all the files are identical. The same issue occurs on all USB drives I have tested and never occurs when using internal drives. The location of the project on the drive also has no effect.
Anyone have any ideas how to get projects to build from a USB drive? I'm using MSVC 2015 on Windows 10.
This may not be relevant but I know there is a long-standing 'feature' in windows which will cause file corruption when writing to USB drives. It appears only to affect programs built in 32-bit mode and run on a 64-bit system. E.g. see the code below.
#include <fstream>
using namespace std;
int main()
{
{
ofstream out ("test.txt", ios:ut | ios::binary);
out << "1234567890" << '\n';
}
{
ofstream out ("test.txt", ios:ut | ios::binary);
out << "abcdef" << '\n';
}
return 0;
}
On an internal drive, the resulting text file contains:
abcdef
but when run on a USB drive it contains:
abcdef
890
Continue reading...
I don't believe the USB drives are at fault here. After downloading the source to the C drive and a USB drive, WinMerge reports all the files are identical. The same issue occurs on all USB drives I have tested and never occurs when using internal drives. The location of the project on the drive also has no effect.
Anyone have any ideas how to get projects to build from a USB drive? I'm using MSVC 2015 on Windows 10.
This may not be relevant but I know there is a long-standing 'feature' in windows which will cause file corruption when writing to USB drives. It appears only to affect programs built in 32-bit mode and run on a 64-bit system. E.g. see the code below.
#include <fstream>
using namespace std;
int main()
{
{
ofstream out ("test.txt", ios:ut | ios::binary);
out << "1234567890" << '\n';
}
{
ofstream out ("test.txt", ios:ut | ios::binary);
out << "abcdef" << '\n';
}
return 0;
}
On an internal drive, the resulting text file contains:
abcdef
but when run on a USB drive it contains:
abcdef
890
Continue reading...