浮点支持未加载,如何强制浮动支持始终内置? [英] floating point support not loaded, how to force floating support always built in ?

查看:858
本文介绍了浮点支持未加载,如何强制浮动支持始终内置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我们有一个非常不同的2010项目,它只与libcmt.lib和我们自己的lib文件链接。


我得到了这个  "浮点支持未加载"


我在网上搜索过,添加的代码如下,


 


float a = 2.34,b = 1.2,c;


int _fltused = 1;


c = a * b;


printf("%f\ n",c);


 


但问题仍然存在对于printf,那么如何强制浮点支持始终内置?


谢谢!

解决方案

嗨ningji,


 


首先,我建议你看一下
的描述 运行时错误
  R6002:未加载浮点支持
并仔细检查上述5个可能的原因是否与您有关。


 


我不清楚你的库。但是,我尝试使用一个空的控制台项目重新编写代码,该项目仅使用上面的代码与libcmt.lib链接。它可以很好地工作
。如果你使用VS2010创建一个简单的项目就像我做的那样,问题仍然存在吗?


 


如果它仍然存在,你能告诉我们一些步骤和相应的设置来重现这个问题吗?


< span style ="font-family:"Segoe UI","sans-serif"; font-size:10pt"> 


问候,



hi We have a a pretty different 2010 project, it only links with libcmt.lib and our own lib files.

The i got this  "floating point support not loaded"

i've searched online, added the code as following,

 

float a = 2.34, b= 1.2, c;

int _fltused = 1;

c = a*b;

printf("%f\n", c);

 

but the problem is still there for printf, so how to force the floating point support to be always built in ?

Thanks !

解决方案

Hi ningji,

 

First of all, I recommend you take a look at the description of the runtime error  R6002: floating-point support not loaded and double check whether the mentioned 5 possible causes are related on your side.

 

I’m not clear about your library. However, I try to repro your code with an empty console project which links with libcmt.lib only using above code. It works well. If you create a simple project using VS2010 as what I did, does the problem remain?

 

If it remains, could you show us some steps and corresponding settings to repro this problem?

 

Regards,

Yi


这篇关于浮点支持未加载,如何强制浮动支持始终内置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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