链接器找不到.obj文件 [英] Linker cannot find .obj files

查看:98
本文介绍了链接器找不到.obj文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,似乎在我的代码编译时,它仅生成.i文件,而不生成.obj文件.所以我收到此消息:

For some reason it seems that when my code compiles, it only makes .i files, and not .obj files. So I get this message:

1>Linking...
1>LINK : fatal error LNK1104: cannot open file ''.\Debug\AddSaleToOrder.obj''



我假设每个.cpp文件都会出现此错误,因为不存在.obj文件.那么,为什么我没有得到任何.obj文件?



I''m assuming this error would occur for each of the .cpp files, since no .obj files exist. So, why am I not getting any .obj files?

推荐答案

您是否已在项目文件中进行了设置,以将源代码预处理为文件(/E选项? )?这将创建.i文件IIRC.如果关闭该选项,则应该创建.obj文件.

干杯,

Have you set something up in your project file to preprocess your source code to a file (/E option)? That creates .i files IIRC. If you turn that option off you should get your .obj files being created.

Cheers,

Ash


这篇关于链接器找不到.obj文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆