没有生成“对象"文件这是什么? [英] no 'object' file generated what is this?
问题描述
没有生成对象"文件,这是什么?
no 'object' file generated what is this?
我为 QNX 移动了我的 c++ 代码,但是当我移动到 VS 时,我不知道为什么会出现这样的错误.没有平台指定的代码,因为我已经用宏把它们分开了.我在网上搜索这个问题,没有这样的解决方案,只是告诉我把它关掉.我想知道为什么会这样.它发生在两个地方:
I move my c++ code that for QNX, but when I move to VS, I don't know why there is such an error. There is no platform specified code, because I already use Macro to separate them. I search on internet this question , no such solution, just tell me to turn it off. I want to know why it happen. The place it happen in two places:
1,试试{....2、srand(time(NULL)),即使我把这行去掉了,还是抛出错误.
1, try{.... 2, srand(time(NULL)), even I remove this line, still throw out error.
推荐答案
在解决根本问题之前需要更多信息,但我对您当前情况的最佳猜测是:
A lot more information is needed before the underlying problem can be solved, but here's my best guess as to what your current situation is:
很可能您在编译过程中遇到了一个或多个警告并且将警告视为错误"选项 (/WX
) 已打开,或者您有一个或多个实际错误.无论哪种方式,编译器都不会生成目标文件或可执行文件.
It's probable that you have one or more warnings during compilation and the "warnings treated like errors" option (/WX
) is on, or you have one or more actual errors. Either way, the compiler therefore is not generating the object file or executable.
这篇关于没有生成“对象"文件这是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!