作者lyle12345 (kl)
看板C_and_CPP
标题[问题] 统计F-test 书上的example 编译时发生错误
时间Sun May 10 15:02:09 2009
老板要我用C++跑统计,不过我C++只自学了几天
书上的example F-test Code:
http://src.wtgstudio.com/?ilOBzF
书上的算式 code:
http://src.wtgstudio.com/?8sUHhy
nr.h code如下:
http://src.wtgstudio.com/?c7xhbX
这是是类似
http://caterpillar.onlyfun.net/Gossip/CppGossip/FunctionABC.html
中math.cpp , math.h , main.cpp的做法吗?
我在DEV-C++开新专案,加入ftest.cpp,nr.h , nr.cpp 贴上去出现如下错误
[Linker error] undefined reference to `NR::avevar(NRVec<double> const&,
double&, double&)'
[Linker error] undefined reference to `NR::avevar(NRVec<double> const&,
double&, double&)'
[Linker error] undefined reference to `NR::gasdev(int&)'
[Linker error] undefined reference to `NR::gasdev(int&)'
[Linker error] undefined reference to `NR::ftest(NRVec<double> const&,
NRVec<double> const&, double&, double&)'
ps. 小弟因为论文需要,这几天才开始学C++所以还不是很清楚...
希望板上的大师能指引我一条路!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.167.34.95
1F:→ TroyLee:标题那个字要怎麽念阿 05/10 15:07
2F:→ lyle12345:打错了XD 感谢 05/10 15:09
3F:→ sosokill:看不太懂 但感觉好像是宣告的问题= = 05/10 15:10
4F:推 godman362:不是,你的nr.h里面只有宣告,没有实做 05/10 16:24
5F:→ godman362:简单来说,他应该是包成dll了,所以是link出问题 05/10 16:24
※ 编辑: lyle12345 来自: 210.62.176.98 (05/12 01:13)