我先多加了一个workspace,然后里面加了一个纯C的work工程,后来我在test里面
#ifdef __cplusplus
extern "C" {
#endif #include "work.h"
#ifdef __cplusplus
}
#endif 但在程序运行的时候,就会出现一个问题,不知道怎么解决,
我在问一下,难道等下在Test工程里,#include 头文件就可以直接调用函数work()了??
C语言是
--------------------wrok.h
#ifndef _WORK_H_
#define _WORK_H_void work();#endif--------------------wrok.c
#include "work.h"void work()
{
printf("Just C work");
}
在TestDlg.h里面的前面加了
#ifdef __cplusplus
extern "C" {
#endif #include "work.h"#ifdef __cplusplus
}
#endif 但是一运行 ,会在
e:\vcp\test\work.c(7) : fatal error C1010: unexpected end of file while looking for precompiled header directive谢谢大家帮忙呀
#ifdef __cplusplus
extern "C" {
#endif #include "work.h"
#ifdef __cplusplus
}
#endif 但在程序运行的时候,就会出现一个问题,不知道怎么解决,
我在问一下,难道等下在Test工程里,#include 头文件就可以直接调用函数work()了??
C语言是
--------------------wrok.h
#ifndef _WORK_H_
#define _WORK_H_void work();#endif--------------------wrok.c
#include "work.h"void work()
{
printf("Just C work");
}
在TestDlg.h里面的前面加了
#ifdef __cplusplus
extern "C" {
#endif #include "work.h"#ifdef __cplusplus
}
#endif 但是一运行 ,会在
e:\vcp\test\work.c(7) : fatal error C1010: unexpected end of file while looking for precompiled header directive谢谢大家帮忙呀
是加在哪里的??
加在work.c里,放在#include "work.h" 的前面吗??
好象放在这前面的话,还是不行的说
不知道应放在那??
放在你的work.c的最上面一行