// nx003_c.cpp : Defines the entry point for the console application.
//在C++工程里加入C文件
#include "nx003_c.h"
int main(int argc, char* argv[])
{
func1();
func2();
cout<<"test"<<endl;
return 0;
}
===========================================
nx003_c.h
extern "C"
{
#include "test.h"
}
#include "test2.h"
===========================================
test.h
#ifndef _TESTH_
#define _TESTH_
#include <stdio.h>
void func1();
#endif
===========================================
test.c
#include "test.h"
void func1()
{
printf("enter here !/r/n");
return;
}
===========================================
test2.h
#ifndef _TEST2H_
#define _TEST2H_</