Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/158.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何在VS中调试使用gcc编译的项目?_C++_Visual Studio_Debugging_Gcc_Fortran - Fatal编程技术网

C++ 如何在VS中调试使用gcc编译的项目?

C++ 如何在VS中调试使用gcc编译的项目?,c++,visual-studio,debugging,gcc,fortran,C++,Visual Studio,Debugging,Gcc,Fortran,我有一个用gcc编译的DLL项目(用fortran,C++编写)。我想调试这个DLL,但我必须附加到Windows上运行的进程(在Visual Studio中编译)。我无法在Visual Studio中将断点插入DLL源。 你能帮我个忙吗 谢谢。为了在Visual Studio和任何调试器的源代码中设置断点,必须找到一种方法将源代码行映射到可执行代码中的地址范围。VisualStudio使用PDB格式创建这种类型的映射。此文件是在Visual Studio中所有语言的生成时生成的。但是gcc不生

我有一个用gcc编译的DLL项目(用fortran,C++编写)。我想调试这个DLL,但我必须附加到Windows上运行的进程(在Visual Studio中编译)。我无法在Visual Studio中将断点插入DLL源。 你能帮我个忙吗


谢谢。

为了在Visual Studio和任何调试器的源代码中设置断点,必须找到一种方法将源代码行映射到可执行代码中的地址范围。VisualStudio使用PDB格式创建这种类型的映射。此文件是在Visual Studio中所有语言的生成时生成的。但是gcc不生成此文件,因此Visual Studio实际上无法将文件中的源代码行映射到生成的可执行文件中有意义的值

除此之外,最简单的方法是使用VisualStudio重建代码,因为您拥有源代码。您可以通过一个月的评估获得IVF,并使用它生成DLL和pdb文件。如果成功了,你喜欢试管受精,让你的老板给你一份


另一种选择是在Linux环境中使用ddd。只要在你的Windows机器上创建一个Linux虚拟机,为Linux重建一切,获得ddd,你就离开了。

你不能。对于初学者来说,GCC生成的调试信息格式与visualstudio使用的不同。要继续,VisualStudio不知道Fortran是什么,因此无论如何都无法使用调试信息,因为它无法使用源代码。