相关疑难解决方法(0)

错误LNK2038:检测到'_ITERATOR_DEBUG_LEVEL'不匹配:值'0'与main.obj中的值'2'不匹配

我已经阅读了很多我的问题的解决方案但没有帮助.我试过干净,重建.重新安装了视觉2010并从专业变为终极.但我仍然不知道为什么我有这个错误.我的项目看起来像这样:1个Exe解决方案来测试我的静态库.1 Dll Solution静态库.转换为dll的代码使用名为ClassificationFramework的1 lib函数.我提供这个lib作为头和cpp基本上是源代码.在Exe解决方案中,我链接了我生成的库+其他一些库来运行它+ ClassificationFramework.dll.当我使用Release时,一切正常,但是当我改为Debug时(因为我想调试一些东西,我厌倦了在发布模式下跳过调试器)我得到了这个:

    2>Link:
    2>  ClassificationFramework.lib(SampleClass.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
    2>ClassificationFramework.lib(SampleClass.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
    2>ClassificationFramework.lib(SampleNamesSet.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
    2>ClassificationFramework.lib(SampleSet.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj …
Run Code Online (Sandbox Code Playgroud)

c++ debugging linker

120
推荐指数
9
解决办法
19万
查看次数

如何输出预处理代码并编译它(Visual Studio)

我正在从Visual Studio生成预处理器输出(.i),但也想进行实际构建.是否有一个标志组合,既可以输出.i文件,又不会阻止编译器正常进行构建?

这当前只是C++,但可能希望稍后将其与CUDA一起使用,所以更喜欢在Visual Studio中工作而不需要命令行的答案(除非它也适用于CUDA).

这样做是为了节省进行Project-> Properties-> Config Props-> C/C++ - > Preprocessor-> Generate Preprocessed File Yes/No plus Rebuild所需的时间.特别令我厌烦的是,预处理器必须运行两次,因此在第1部分中以某种方式生成.i文件然后在第2部分中编译该文件的解决方案就没问题了.

我正在使用的Visual Studio的确切版本是VS 2008 Express

c++ cuda visual-studio c-preprocessor

8
推荐指数
1
解决办法
4502
查看次数

Eclipse无法链接到kernel32.lib

我已经安装了Eclipse CDT,因此我将能够编写和编译C代码.

编译进度失败,出现以下错误:

LNK1104 : cannot open file kernel32.lib
Run Code Online (Sandbox Code Playgroud)

我一直在我的电脑里搜索这个文件,发现它出现在一些文件夹中,

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
Run Code Online (Sandbox Code Playgroud)

我怎么能"引用"eclipse到这些特定的路径之一,这样kernel32.lib才能找到文件,我将能够编译和运行C文件?

编辑 感谢@mux回答 LNK1104 : cannot open file kernel32.lib现在已经不见了,但现在出现了一个新的错误: LNK1104 : cannot open file 'C:\Program.lib'.再一次,任何建议都会有所帮助.

c c++ eclipse eclipse-cdt

8
推荐指数
3
解决办法
1万
查看次数

致命错误LNK1104

当我在visual studio c ++ 2008中编译我的代码时,我收到以下错误:

fatal error LNK1104: cannot open file 'C:\Users\...\Documents\Visual Studio         
2008\Projects\...\Debug\....exe
Run Code Online (Sandbox Code Playgroud)

我刚从Visual Studio C++中的另一个项目中复制了我的代码,并再次在VS C++中将其粘贴到这个项目中.它会导致此错误吗?

visual-c++

6
推荐指数
1
解决办法
2万
查看次数