又是lib的问题?
duker 2001-08-23 04:49:38 我在bcb中生成了一个h文件function,里面只有一行
int mytest1(int temp);
然后加入一个cpp文件:
int mytest1(int temp){
return 25;
}
之后编译生成一个mylib.lib文件
将mylib.lib文件和function.h文件拷贝到另外一个工程的目录下面
在其中#include "function.h" 再某处调用了 mytest1
在工程中加入了 mylib.lib文件,然后编译
居然告诉我:
[Linker Error] Unresolved external mytest1(int) referenced from D:\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\LIBUSETEST\MAIN.OBJ
这是什么原因?