Use Qt in Debian for OpenCASCADE

eryar@163.com

Recently several OpenCASCADE enthusiasts want to build my simple Qt demo about OpenCASCADE on ubuntu system, but could not compile it successfully. Because I only compiled the occQt in Windows system, do not try it in Linux system. I try to build it on Debian system, also have the same errors as follows:

Figure 1. Compile errors of Building occQt on Debian

In order to use Qt5 in Debian7, you can input the following commands:

1. Get Qt5 on Debian:

sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools qtchooser

2. Download the newest version of QtCreator from Qt website:

http://www.qt.io/download-open-source/#section-6

You can get the following file:

qt-creator-opensource-linux-x86_64-3.4.0.run

Figure 2. Download Qt Creator for Linux

3. Install QtCreator manually:

Install Qt Creator manually by the following commands:

chmod u+x ./qt-creator-opensource-linux-x86_64-3.4.0.run

./qt-creator-opensource-linux-x86_64-3.4.0.run

Figure 3. Qt Creator Setup

Figure 4. Qt Creator Setup

4. It is succeed When the Qt Creator Icon appears in the Applications.

Figure 5. Qt Creator in Applications

5. I tried the math_Vector, it runs correctly, the code list as follows:

#include <math_Vector.hxx>

void TestVector(void)
{
    math_Vector aVector(1, 3);

aVector.Init(1.0);
    aVector.Dump(std::cout);

aVector = -aVector;
    aVector.Dump(std::cout);

aVector = aVector.Opposite();
    aVector.Dump(std::cout);

}

int main()
{
    TestVector();

return 0;
}

The configuration of the test project as follows:

TEMPLATE = app

CONFIG += console

CONFIG -= app_bundle

CONFIG -= qt

SOURCES += main.cpp

include(deployment.pri)

qtcAddDeployment()

INCLUDEPATH += /home/eryar/opencascade-6.8.0/inc

DEPENDPATH += /home/eryar/opencascade-6.8.0

LIBS += -L/home/eryar/opencascade-6.8.0/lib/ -lTKernel -lTKMath

The result shows:

Figure 6. Test math_Vector in Qt on Debian

It
can compile and run correctly, the compile error in occQt do not appear
in the test program. you can also debug the code in Qt Creator. So use
Qt Creator to program on Linux is very convenient.

Use Qt in Debian for OpenCASCADE的更多相关文章

  1. A Simple OpenCASCADE Qt Demo-occQt

    A Simple OpenCASCADE Qt Demo-occQt eryar@163.com Abstract. OpenCASCADE have provided the Qt samples ...

  2. Qt with OpenCascade

    Qt with OpenCascade 摘要Abstract:详细介绍了如何在Qt中使用OpenCascade. 关键字Key Words:Qt.OpenCascade 一.引言 Introducti ...

  3. fedora18 You might need to install dependency packages for libxcb.

    22 down vote The page Qt for X11 Requirements lists some packages required to build Qt on Debian. Th ...

  4. linux(debian) arm-linux-g++ v4.5.1交叉编译 embedded arm 版本的QtWebkit (browser) 使用qt 4.8.6 版本

    最近需要做一个项目 在arm 架构的linux下 没有桌面环境的情况下拉起 有界面的浏览器使用. 考虑用qt 的界面和 qtwebikt 的库去实现这一系列操作. 本文参考: Qt移植到ARM Lin ...

  5. Building OpenCASCADE on Debian

    Building OpenCASCADE on Debian eryar@163.com Abstract. When you are familiar with OpenCASCADE on Win ...

  6. 【转】补充说明:关于Beaglebone black上debian无图形界面的问题及QT的窗口示例

    有个兄弟发了一个站内的私信给我,内容如下: 时间:2014-03-05 09:08:19 大哥,debian 的BBB版本没有图形界面吧 我安装后只有文本界面 我突然意识到,我前面有没有说清楚的地方, ...

  7. linux(debian) arm-linux-g++ v4.5.1交叉编译 embedded arm 版本的QtWebkit (browser) 使用qt 4.8.6 版本 以及x64上编译qt

    最近需要做一个项目 在arm 架构的linux下 没有桌面环境的情况下拉起 有界面的浏览器使用. 考虑用qt 的界面和 qtwebikt 的库去实现这一系列操作. 本文参考: Qt移植到ARM Lin ...

  8. Linux Debian 如何部署 Qt?

    Linux Debian 如何部署 Qt? 在这里以 HelloWorld 为例 目录结构如下: . ├── HelloWorld ├── HelloWorld.sh ├── imageformats ...

  9. [Qt]-打包程序为Debian的deb格式的安装包

    参考:https://segmentfault.com/a/1190000005029385 参考:UnityLaunchersAndDesktopFiles deb是Debian Linux的软件包 ...

随机推荐

  1. Spring AOP详解

    一.前言 在以前的项目中,很少去关注spring aop的具体实现与理论,只是简单了解了一下什么是aop具体怎么用,看到了一篇博文写得还不错,就转载来学习一下,博文地址:http://www.cnbl ...

  2. acm入门 杭电1001题 有关溢出的考虑

    最近在尝试做acm试题,刚刚是1001题就把我困住了,这是题目: Problem Description In this problem, your task is to calculate SUM( ...

  3. 【BFS】HDU 1495

    直达–> HDU 1495 非常可乐 相似题联动–>POJ 3414 Pots 题意:中文题,不解释. 思路:三个杯子倒来倒去,最后能让其中两个平分即可.可能性六种.判定的时候注意第三个杯 ...

  4. init shutdown reboot poweroff halt区别

    init 首先看看LINUX系统几种运行级别# 0 - 停机(千万别把initdefault设置为0,否则系统永远无法启动)# 1 - 单用户模式# 2 - 多用户,没有 NFS# 3 - 完全多用户 ...

  5. bootstrap之CDN

    bootstrap之CDN CDN是Content Delivery Network的缩写,简单的说就是Bootstrap把自己的css.Js等文件托管到某一个网络服务器上使用时调用.如果与Inter ...

  6. 对JavaScript闭包和原型理解

    最近在学js脚本的一些东西觉得里面有2个知识点比较难理解所以做了如下总结. 1.闭包 简单的理解:一个函数a ,内部有个函数b,那么这个函数b当被作为a函数的返回值得时候被外部的全局变量引用了,那么这 ...

  7. #研发解决方案#iDB-数据库自动化运维平台

    郑昀 创建于2015/12/2 最后更新于2015/12/2 关键词:数据库,MySQL,自动化运维,AutoDDL,刷库,帐号授权,审核,回滚 提纲: 数据库自动化运维什么?别人家是怎么玩的? 我们 ...

  8. sphinx搜索实例

    多个关键词搜索一个字段的几种方式测试 @proname "ygm" "磨粉机" "2" //搜索结果proname字段必须同时包含3个词,有 ...

  9. Android历史版本Logo

        Android操作系统是一个由Google和开放手持设备联盟共同开发发展的移动设备操作系统,其最早的一个版本Android 1.0 beta发布于2007年11月5日,至今已经发布了多个更新. ...

  10. python中__init__问题

    python中安装目录中的Lib文件夹模块中的__init__.py文件(文件内容可以为空),用于标识此文件夹是一个模块 python编程中的__init__表示初始化