简体   繁体   English

Visual Studio找不到nafxcwd.pdb

[英]Visual studio cannot find nafxcwd.pdb

I am working in a mixed Fortran-C++ programming environment. 我正在混合的Fortran-C ++编程环境中工作。 The C++ project is a static library ( XMLParser.lib ) used to read and write into XML files. C ++项目是一个静态库( XMLParser.lib ),用于读取和写入XML文件。 It is added as an additional dependency to Fortran project, which is a DLL library ( engine.dll ) used to perform mathematical computations. 它作为Fortran项目的附加依赖项而添加,该项目是用于执行数学计算的DLL库( engine.dll )。 The Fortran uses CRT ( LIBCMTD ) and C++ is using MFC libraries. Fortran使用CRT( LIBCMTD ),而C ++使用MFC库。 As described in Here , this can cause linker error if LIBCMTD and NAFXCWD libraries are not linked in the correct order. 作为描述在这里 ,这可能会导致连接错误如果LIBCMTDNAFXCWD库不按照正确的顺序链接。 To avoid this issue I had to add nafxcwd.lib as an additional dependency to C++ project. 为避免此问题,我必须将nafxcwd.lib添加为C ++项目的附加依赖项。

Everything works fine and solution is compiled successfully however, while linking these projects, compiler is compaining that it cannot find nafxcwd.pdb file in $(OUTDIR) folder (the output folder where C++ static library is created). 一切正常,解决方案已成功编译,但是,在链接这些项目时,编译器抱怨它无法在$(OUTDIR)文件夹(创建C ++静态库的输出文件夹$(OUTDIR)找到nafxcwd.pdb文件。 To work around this issue, I had to copy nafxcwd.pdb from Visual Studio folder into my output folder, which is not a practical option since this very specific instruction should be shared with every other programmer in my group. 要变通解决此问题,我必须将nafxcwd.pdb从Visual Studio文件夹复制到我的输出文件夹中,这是不切实际的选择,因为该非常具体的指令应该与我组中的所有其他程序员共享。 I have tried different options related to creating pdb file (ie /Zi, /Z7, and ZI) but none of them seems to be working. 我尝试了与创建pdb文件相关的其他选项(例如/ Zi,/ Z7和ZI),但似乎都没有用。

2>XMLParser.lib(dumpcont.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(dumpflt.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(arccore.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(arcobj.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(arcex.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(arcstrm.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(dumpinit.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(dumpout.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(afxasert.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(afxmem.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(filecore.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(filetxt.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(filex.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(filest.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info
2>XMLParser.lib(array_b.obj) : warning LNK4099: PDB 'nafxcwd.pdb' was not found with 'd:\Debug\XMLParser.lib' or at 'D:\Debug\nafxcwd.pdb'; linking object as if no debug info

I appreciate if you could help me with the following questions: 如果您能帮助我解决以下问题,我们将不胜感激:

  1. Why visual studio is looking for nafxcwd.pdb in output folder instead of VS folder? 为什么Visual Studio在输出文件夹而不是VS文件夹中寻找nafxcwd.pdb
  2. Is there any way to embed nafxcwd.pdb into XMLParser.obj file to ensure that linker will always find it? 有什么方法可以将nafxcwd.pdb嵌入XMLParser.obj文件中,以确保链接器始终可以找到它?

Any help is appreciated. 任何帮助表示赞赏。

I figured out the answer to this problem. 我想出了这个问题的答案。 In the Fortran project, I added nafxcwd.lib libcmtd.lib to additional project dependencies, and added the same libraries to ignore list. 在Fortran项目中,我将nafxcwd.lib libcmtd.lib添加到其他项目依赖项中,并添加了相同的库以忽略列表。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows 10中的Visual Studio 2012:找不到或打开PDB文件 - Visual Studio 2012 in Windows 10: Cannot find or open the PDB file 在Visual Studio C ++ 2010中找不到或打开PDB文件 - Cannot find or open the PDB file in Visual Studio C++ 2010 找不到或打开PDB文件Visual Studio 2012 - Cannot find or open the PDB file Visual studio 2012 Cannote找到PDB Visual Studio 2010 - Cannote find PDB Visual Studio 2010 (C ++ / Visual Studio)无法找到或打开pdb文件且无法打印到控制台 - (C++/Visual Studio) cannot find or open pdb file & no printing to console C ++ Microsoft Visual Studio 2015调试问题(无法找到或打开PDB文件。) - C++ Microsoft Visual Studio 2015 Debug issue (Cannot find or open the PDB file.) 如何修复“无法找到或打开 PDB 文件”。 在 Visual Studio 2017 中 - How to fix the "Cannot find or open the PDB file." in Visual Studio 2017 在Visual Studio中使用本地Windows调试器运行了第一个程序。 输出窗口显示大量“找不到或打开PDB文件” - ran first program with local windows debugger in visual studio. Output window displays numerous “Cannot find or open the PDB file” Visual Studio 2017 'C:\\OpenCV-3.3.0\\opencv\\build\\x64\\vc14\\bin\\opencv_world330d.dll'。 无法找到或打开 PDB 文件 - Visual Studio 2017 'C:\OpenCV-3.3.0\opencv\build\x64\vc14\bin\opencv_world330d.dll'. Cannot find or open the PDB file 在Visual Studio中包含带有库管理程序的.pdb文件 - Including .pdb files with librarian in Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM