“黄沙中,飞舞着我们的先王,他们在空中俯视着子民们对蓝色的向往。” 火之章 霜之章 [最新更新:9月15日]

你在这里看到的是一位.NET程序员的执着及其信仰的效率世界观。我们行走在消逝中,但我们都有希望,都有传承。

visualc++6中“main.c line 494”问题的解决方案 ,2008-12-12,0条评论

今天有个荆手的问题赶工,64位系统下面完全不认win32的dll,搞了半天,居然发现问题是出在visual c++2008的编译器问题 ,换2005也一样,再换到VC6就行了,但是在VC6的release编译中又遇到另一个问题:main.c line 494,查了MSDN:

  The   compiler   cannot   generate   correct   code   for   a   construct,   probably   due   the   combination   of   an   expression   and   an   optimization   option.   Try   removing   one   or   more   optimization   options   and   recompiling   the   function   containing   the   line   indicated   in   the   error   message.  
   
  You   can   probably   fix   the   problem   by   removing   one   or   more   optimization   options.   To   determine   which   option   is   at   fault,   remove   options   one   at   a   time   and   recompile   until   the   error   message   goes   away.   The   options   most   commonly   responsible   are   /Og,   /Oi,   and   /Oa.   Once   you   determine   which   option   is   responsible,   you   can   disable   it   using   the   optimize   pragma   around   the   function   where   the   error   occurs   and   continue   to   use   the   option   for   the   rest   of   the   module.

大概意思是 某些优化选项造成了这个问题 ,自己一个个慢慢调整,终于发现问题所在:



默认的优化选项是最快速度,这样会很容易出错,我们只需要设置成default就可以了
mcts

Category

Tag

Archives

  • kvspas
  • Powered by Google App Engine