如题,怎么才能正常使用C库呢?
库大致是这样的
#include "stdafx.h "
//文件:lib.cpp
#include "testFile.h "
#include "stdio.h "
int TestCreateFile(const char* aFileName)
{
FILE * fp = fopen(aFileName, "w ");
if(!fp) return 0;
fputs(aFileName, fp);
return 1;
}
int Test123(int a,int b)
{
return a+b;
}
#ifndef LIB_H
#define LIB_H
extern "C "{
int TestCreateFile(const char* aFileName);
int Test123(int a,int b);
}
#endif
在symbian 中我这样使用,不知道为什么不行
在ui.h
#include "testfile.h "
ui.cpp
constructL()
{
...
TestCreateFile(iFileName);
...
}
*.mmp
STATICLABRARY testfile.lib
此文件我已经复制到相应的目录下
release\winscw\udeb
release\armv5\lib\
release\armv5\urel\
请问整个过程有什么错误吗??
------解决方案--------------------------------------------------------
Using C code in symbian
http://www.newlc.com/Using-C-code-in-symbian