加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

C语言错误--floating-point support not loaded

(2012-12-24 18:59:40)
分类: C
今天遇到一个新的错误:floating-point support not loaded。是float类型的数据未初始化,导致运行时未链接浮点库。
解决方法:增加一个float参数函数,或为一个浮点数赋值,注意不要被优化掉。
最后添加了一个double d=0.0;就ok了。

floating-point support not loaded


The necessary floating-point library was not linked.

To fix by checking the following possible causes

1.The program was compiled or linked with an option, such as /FPi87, that requires a coprocessor, but the program was run on a machine that did not have a coprocessor installed.

2.A format string for a printf_s or scanf_s function contained a floating-point format specification and the program did not contain any floating-point values or variables.

3.The compiler minimizes a program's size by loading floating-point support only when necessary.The compiler cannot detect floating-point format specifications in format strings, so it does not load the necessary floating-point routines.

4.Use a floating-point argument to correspond to the floating-point format specification, or perform a floating-point assignment elsewhere in the program. This causes floating-point support to be loaded.

5.In a mixed-language program, a C library was specified before a FORTRAN library when the program was linked. Relink and specify the C library last.

错误消息

未加载浮点支持

 

未链接必需的浮点库。

通过检查下面的可能原因进行修复

  1. 该程序通过选项(如 /FPi87,该选项要求有协处理器)被编译或链接,但该程序运行在一台未安装协处理器的计算机上。

  2. printf_s 或 scanf_s 函数的格式字符串包含浮点格式规范,而该程序不包含任何浮点值或变量。

  3. 编译器仅当必要时才通过加载浮点支持以最小化程序大小。编译器无法检测到格式字符串中的浮点格式规范,因此编译器未加载必要的浮点例程。

  4. 使用浮点参数以符合浮点格式规范,或在程序的其他地方执行浮点赋值。该操作将导致加载浮点支持。

  5. 在由混合语言编写的程序中,当程序进行链接时在 FORTRAN 库之前指定了 C 库。重新链接并最后指定 C 库。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有