一个简单的C语言问题,急,在线等!
源文件如下:
// test.h
void test(void);
// test.c
#include <stdio.>
void test(void)
{
printf( "this is a test " );
}
// tem.c
#include "test.h "
int main()
{
test();
return 0;
}
为什么在使用 BORLANDC++ 3.1(因为是DOS下的开发) 在Build all 时却提示:
Linker Error: Undefined symbol _test in module TEM.c
这是为什么呢?如何解决?请大家帮忙看看把!
[解决办法]
BORLANDC++ 3.1 没用过,但是用vs2003来写c的时候一般要#include "stdafx.h "的
最好还是把函数声明写在 #include……之后,否则的话,在ms的vs里面会有一堆的编译问题,
[解决办法]
你这个是连接错误,因此看看头文件缺少没,该加的lib加没?文件里面加了,那么工程里面加了吗?
我没用过你这个编译器。
[解决办法]
test.c里面是不是也要加上#include "test.h "啊
[解决办法]
嗯
要加上实现撒
[解决办法]
加不加没关系吧?