首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Symbian >

用纯C写的库如何在symbian中使用呢

2012-01-15 
用纯C写的库怎么在symbian中使用呢?如题,怎么才能正常使用C库呢?库大致是这样的#includestdafx.h //文件

用纯C写的库怎么在symbian中使用呢?
如题,怎么才能正常使用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.html

热点排行