Use Qt in Debian for OpenCASCADE

简介: 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.

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:

wps_clip_image-9806

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

wps_clip_image-22633

Figure 2. Download Qt Creator for Linux

3. Install QtCreator manually:

Install Qt Creator manually by the following commands:

chmod  u + ./ qt - creator - opensource - linux - x86_64 - 3.4 . 0 . run

./ qt - creator - opensource - linux - x86_64 - 3.4 . 0 . run

wps_clip_image-16257

Figure 3. Qt Creator Setup

wps_clip_image-3440

Figure 4. Qt Creator Setup

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

wps_clip_image-26540

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:

wps_clip_image-25550

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.

目录
相关文章
|
测试技术 Linux Windows
Try to use Debian
Try to use Debian eryar@163.com Debian是OpenCASCADE用于Linux操作系统测试的专用系统。这几天下载安装了Debian系统,体验了一下,感觉还不错:简洁,精致。
1140 0
|
7月前
|
消息中间件 Kubernetes NoSQL
Debian11系统boost库安装
Debian11系统boost库安装
|
16天前
|
Ubuntu
ubuntu和debian 的安装包dpkg管理命令对安装包进行安装,查询,卸载
Ubuntu dpkg 软件包管理命令概览:安装、卸载、查看和配置软件包。包括解决依赖、强制卸载、列出及过滤已安装包、查看包详情等操作。
48 10
|
2月前
|
Oracle Java 关系型数据库
在 Debian 12 上安装 Java 21
在 Debian 12 上安装 Java 21
|
4月前
|
Kubernetes 应用服务中间件 nginx
debian11使用kubeadm安装k8s
debian11使用kubeadm安装k8s
|
4月前
|
安全 Ubuntu Shell
深入挖掘Debian系统中安装Docker
【8月更文挑战第21天】在Debian系统中安装Docker需按步骤操作:首先确保软件包更新,执行`sudo apt update`并安装必要软件包支持HTTPS;接着添加Docker官方GPG密钥以验证包的完整性和安全性;然后设置Docker稳定版仓库,通过`tee`命令配置仓库文件;再更新软件包索引;最后安装Docker Engine并通过运行测试容器确认安装成功。此指南适用于多数Debian版本,如遇问题请查阅官方文档。
274 0
|
4月前
|
存储 Linux 开发工具
在Debian 8上安装Git的方法
在Debian 8上安装Git的方法
38 0
|
4月前
|
SQL 关系型数据库 Linux
如何在 Debian 8 上安装和使用 PostgreSQL 9
如何在 Debian 8 上安装和使用 PostgreSQL 9
54 0
|
4月前
|
数据可视化 关系型数据库 MySQL
在Debian 7上安装和保护phpMyAdmin的方法
在Debian 7上安装和保护phpMyAdmin的方法
58 0
|
4月前
|
安全 Linux 网络安全
如何在Debian 9上安装和配置VNC
如何在Debian 9上安装和配置VNC
103 0