Link Error for (float)x = (int)j, pls help.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Link Error for (float)x = (int)j, pls help.

4,250 次查看
krude
Contributor I
Hi,
I was trying to perform a math function say:
double x;
int y;

x = (double) y * 2.0;

I got errors that say symbol _DSFLOAT in file:*object file* is undefined.

Can anyone help me?

p.s dun worry y is not initialized because in my main code, it is defined. And if you guys think it is necessary, i can show u guys my main code. Just dun want to complicate things up yet.

It will only work when all the variables are of the same type.

T-H-A-N-K Y-O-U
标签 (1)
0 项奖励
回复
2 回复数

1,091 次查看
krude
Contributor I
Thank you! I finally solved the problem. Thanks once more.
0 项奖励
回复

1,091 次查看
CrasyCat
Specialist III

Hello

Apparently you are not linking your application against the appropriate ANSI library.
In order to make sure this works:

   - Create your project using the wizard
   - Make sure you specify you want to use Floating Point arithmetic and select
     the floating point format you wish to use.
  - Add your source code to the application.

This should fix it.

CrasyCat

0 项奖励
回复