qt 如何调用c函数
2015-12-06 13:12
399 查看
many opensource code is in c code format for most wide use. qt uses c++.so use c function is the same as common C++ and C program.c functions and var to be called by c++ should be in a header file:
//cHeader.h
#ifdef __cplusplus
extern "C" {
#endifvoid cFuncCalledByCPlus();extern int cVar;
#ifdef __cplusplus
}
#endifin Cplus code, include "cHeader.h" and use functions and variables from c. So simple.
相关文章推荐
- qt5 解析Json文件
- MySQL的安装、编译Qt驱动和测试
- MySQL的安装、编译Qt驱动和测试
- PyQt5教程(五)——对话框
- Qt 设置鼠标
- Qt 打开保存文件对话框
- Qt 设置程序图标
- Qt 创建上下文菜单
- Qt如何实现多窗口调用
- Opencv--Qt5编译与配置
- Windows下 Qt5.1 not load The QtplatForm plugin "windows"
- QT5 下udp 编程实例
- QT线程(一):线程类 http://blog.csdn.net/calm_agan/article/details/6300709
- QtPropertyBrowser简介
- Qt udp
- Qt5 UDP开发
- 关于QT中对窗口中某个widget建类
- U1077:"C:\Qt5.4.2\5.4\msvc2013_64_opengl\bin\moc.exe":返回代码“0x1”
- Qt The Event System
- qt+opencv3.0配置详解