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. [VijosP1764]Dual Matrices 题解

    题目大意: 一个N行M列的二维矩阵,矩阵的每个位置上是一个绝对值不超过1000的整数.你需要找到两个不相交的A*B的连续子矩形,使得这两个矩形包含的元素之和尽量大. 思路: 预处理,n2时间算出每个点 ...

  2. iframe框架用法

    1.iframe标签: <iframe src="demo1.html" name="qiuqiu_Page" frameborder="0&q ...

  3. Android api SmsMessage类createFromPdu(byte[] pdu) is depracted(不推荐使用,过时的)

    我想实现一个,监听功能--当手机收到相关短信,触发一些时间,程序中 SmsMessage smsMessage = SmsMessage.createFromPdu((byte[]) obj); cr ...

  4. Code[VS] 1230 题解

    1230 元素查找 题目描述 Description 给出n个正整数,然后有m个询问,每个询问一个整数,询问该整数是否在n个正整数中出现过. 输入描述 Input Description 第一行两个整 ...

  5. db2基础

    DB2知识文档 一.db2 基础 基本语法 注释:"--"(两个减号) 字符串连接:"||" 如set msg='aaaa'||'bbbb',则msg为'aaa ...

  6. python使用pdkdf2加盐密码

    from werkzeug.security import generate_password_hash, check_password_hash pw = generate_password_has ...

  7. mysql外键添加error1215

    在mysql创建表外键的过程中,由于操作不当,会提示cannot add foreign key constraint的错误. 造成此错误可能的原因如下: 1.数据类型不匹配,外键与其相关联的键必须数 ...

  8. java学习-关于字符串String

    有必要总结记录一下java的学习,否则,永远只是记忆碎片化和always google(费时) 刚好,小伙伴给了一份自己做的review,在学习的过程中,update一下自己的见解和学习内容: 关于S ...

  9. 信号量sem

    一.什么是信号量 为了防止出现因多个程序同时访问一个共享资源而引发的一系列问题,我们需要一种方法,它可以通过生成并使用令牌来授权,在任一时刻只能有一个执行线程访问代码的临界区域.临界区域是指执行数据更 ...

  10. [LintCode] Intersection of Two Linked Lists 求两个链表的交点

    Write a program to find the node at which the intersection of two singly linked lists begins. Notice ...