The short of it is, I have VMs for building different scenarios of software. I do not wish to snapshot the code as it is backup elsewhere so I am storing all my code on the host PC and only building/testing in VMs to save space. Unfortunately I am receiving program database update errors when I try to build from a location mapped to the host hdd. I know there is nothing wrong with the C++ projects as they build fine if moved inside the VM.
缺点是,我有用于构建不同软件场景的虚拟机。我不希望快照代码,因为它是其他地方的备份,所以我将所有代码存储在主机PC上,只在VM中构建/测试以节省空间。不幸的是,当我尝试从映射到主机hdd的位置构建时,我收到程序数据库更新错误。我知道C ++项目没有任何问题,因为如果在VM内部移动它们会很好。
I have tried:
-cleaning/rebuilding
-removing the debug/release folders entirely
-checking out a copy of the source onto the host drive from within the VM
我尝试过: - 清理/重建 - 完全删除调试/发布文件夹 - 从VM中检查源副本到主机驱动器上
*Even when the idb and pdb files that the compiler complains about are created by VS, the problem persists.
*即使编译器抱怨的idb和pdb文件是由VS创建的,问题仍然存在。
How can I stop these C2471 errors when building from a non-local drive?
从非本地驱动器构建时,如何阻止这些C2471错误?
2 个解决方案
#1
Perhaps, problem in the files that was created by compiler at previus build. Try to remove Debug
(or Release
) folder and build project again.
也许,编译器在previus版本中创建的文件中存在问题。尝试删除Debug(或Release)文件夹并再次构建项目。
#2
I'm not entirely sure as to why, but the issue seems to be related to using shared folders in VirtualBox. If the folders are referenced via a direct UNC path to the host machine it appears to work fine, but accessing through a shared folder (mapped or unmapped to a drive letter) doesn't appear to have the correct permissions.
我不完全确定为什么,但问题似乎与在VirtualBox中使用共享文件夹有关。如果通过直接UNC路径引用文件夹到主机,它似乎工作正常,但通过共享文件夹(映射或未映射到驱动器号)访问似乎没有正确的权限。
#1
Perhaps, problem in the files that was created by compiler at previus build. Try to remove Debug
(or Release
) folder and build project again.
也许,编译器在previus版本中创建的文件中存在问题。尝试删除Debug(或Release)文件夹并再次构建项目。
#2
I'm not entirely sure as to why, but the issue seems to be related to using shared folders in VirtualBox. If the folders are referenced via a direct UNC path to the host machine it appears to work fine, but accessing through a shared folder (mapped or unmapped to a drive letter) doesn't appear to have the correct permissions.
我不完全确定为什么,但问题似乎与在VirtualBox中使用共享文件夹有关。如果通过直接UNC路径引用文件夹到主机,它似乎工作正常,但通过共享文件夹(映射或未映射到驱动器号)访问似乎没有正确的权限。