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. @WebServlet用注解来实现servlet和url的映射

    package com.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.Se ...

  2. 泛型的排序问题(Collections.sort及Comparable的应用)

    一.前言    java中对泛型(集合类型)排序的问题,主要采用了两张方式一种是对要排序的实体类,实现Comparable接口,另一种方式,Collections集合工具类进行排序. 二.实现Comp ...

  3. JAVA集合类型详解

    一.前言 作为java面试的常客[集合类型]是永恒的话题:在开发中,主要了解具体的使用,没有太多的去关注具体的理论说明,掌握那几种常用的集合类型貌似也就够使用了:导致这一些集合类型的理论有可能经常的忘 ...

  4. 关于在header里增加参数的方式

    在使用一个API的时候,文档里写的返回值类型是json,可是试了下返回的明明是xml,还小小的鄙视了一把. 可是解析xml,好麻烦的.最好是json可以直接decode . 意外看到文档下面有一句 J ...

  5. 简述HTML DOM及其节点分类

    在JavaScript中,document这个对象大家一定很熟悉,哪怕是刚刚开始学习的新人,也会很快接触到这个对象.而document对象不仅仅是一个普通的JavaScript内置对象,它还是一个巨大 ...

  6. Linux Shell 截取字符串

    Linux Shell 截取字符串 shell中截取字符串的方法很多 ${var#*/} ${var##*/} ${var%/*} ${var%%/*} ${var:start:len} ${var: ...

  7. Storm 中什么是-acker,acker工作流程介绍

    概述 我们知道storm一个很重要的特性是它能够保证你发出的每条消息都会被完整处理, 完整处理的意思是指: 一个tuple被完全处理的意思是: 这个tuple以及由这个tuple所导致的所有的tupl ...

  8. Ubuntu Java 环境变量

    方法1:修改/etc/profile 文件所有用户的 shell都有权使用这些环境变量<1>在 shell终端执行命令:vi /etc/profile<2>在 profile文 ...

  9. 响应式web网站设计制作方法

    在研究响应式的时候,记录了一些感想,分享出来,抛砖引玉,希望可以和大家一起讨论.总结下来,响应式比之前想象的要复杂得多.1. ie9以下(不包括ie9)采用ie条件注释,为ie8以及一下单独开一个样式 ...

  10. Unity3D 脚本手册

    1.private Ray ray;  --定义射线 ray = Camera.main.ScreenPointToRay(Input.mousePosition);  --摄像机发出的射线投射鼠标到 ...