c语言始终未定义函数,c – 声明但未定义的函数?然而它被定义了

header.h

namespace VectorMath {

static FVector Make(float X, float Y, float Z);

}

file.cpp

namespace VectorMath {

static FVector Make(float X, float Y, float Z)

{

FVector ret;

ret.X = X;

ret.Y = Y;

ret.Z = Z;

return ret;

}

}

错误

1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring(541): error C2129: static function ‘FVector VectorMath::Make(float,float,float)’ declared but not defined

1> c:\programming****\vectormath.h(19) : see declaration of ‘VectorMath::Make’

错误指向xstring(标准字符串库的一部分)第541行,它似乎与任何东西都没有任何关系.

我想要注意,删除“静态”会给我链接器错误,告诉我“Make”是一个未解析的外部符号……

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值