Linker error calling C-Function from Objective-C++
来源:互联网 发布:微信群成语接龙软件 编辑:程序博客网 时间:2024/06/05 02:16
转自:http://stackoverflow.com/questions/9334650/linker-error-calling-c-function-from-objective-c
If you are using c function in c++ file. you should use extern "c"{}
. In .h file
#ifdef __cplusplusextern "C" {#endifswrve_currency_given(parameter1, parameter2, parameter3);// a c function#ifdef __cplusplus}#endif
extern "C" is meant to be recognized by a C++ compiler and to notify the compiler that the noted function is (or to be) compiled in C style.
If you're linking to a library that was compiled as C code. use
extern "C" { #include "c_only_header.h"}
Take a look at When to use extern "C" in C++?
- Linker error calling C-Function from Objective-C++
- Calling Ruby From C
- C++builder Linker error
- Calling Fortran function and subroutines from a C or C++ function
- Calling C Programs from IDL
- Objective-C’s Roots: Difference Between messaging structure and function calling; and the Runtime
- stack changes when calling function in c
- c++builder error:[Linker Error] Unresolved external 'GetAdaptersInfo' referenced from……
- Calling C From Java Is Easy
- chapter 27 Calling C from Lua
- calling lua from c in linux
- Calling Haskell from C - (DLL solution)
- Calling C and C++ from IDL (一)
- Calling C/C++ functions from C#
- Calling C Code From Mono/.NET
- Calling Lua function from C++
- Calling C++ Functions From Lua(lua调用c/c++)
- Calling CUDA program from C/C++ project
- Android中文语音合成(TTS)各家引擎对比
- 优化大师带来的灾难及redo重建-oracle数据库恢复
- ADS编译ARM程序时对RO,RW,ZI段的理解
- 海量数据处理--倒排索引
- TTS技术简单介绍和Ekho(余音)TTS的安装与编程
- Linker error calling C-Function from Objective-C++
- 我的纯HTML网页(汽车网页)
- 多元备份控制文件
- Android屏幕监视工具
- alter system switch logfile 和 alter system archive log current 的区别
- 寻找丑数(Ugly Number)
- 黑马程序员_java学习笔记05
- NSAlert使用
- python编辑器对比和推荐