博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Use Qt in Debian for OpenCASCADE
阅读量:7217 次
发布时间:2019-06-29

本文共 2121 字,大约阅读时间需要 7 分钟。

Use Qt in Debian for OpenCASCADE

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:

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
+
./
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.

PDF Version:

转载地址:http://gtiym.baihongyu.com/

你可能感兴趣的文章
你必须掌握的 21 个 Java 核心技术!
查看>>
告诉你WHT中文站是什么?
查看>>
4、Juniper SSG520 PPTP映射到ROS后MAC无法连接解决方法
查看>>
利用批处理文件来建立一个记录3389登陆者信息
查看>>
Linux 系统下双机HA的实现
查看>>
02_swarm mode key concepts
查看>>
Eclipse打包插件Fat Jar 解压打包
查看>>
Apache Shiro 使用手册
查看>>
CentOS mini 6.5 安装DB2 Express-C 问题处理记录
查看>>
DirectByteBuffer
查看>>
Docker Compose文件详解 V2
查看>>
Memcached的原理与应用(未完)
查看>>
基于 Confluence 6 数据中心的 SAML 单点登录设置你的身份提供者
查看>>
mysql总结
查看>>
Navicat for MySQL版本更新至v11.2.12,修复多项问题|附下载
查看>>
整理 JAVA中的IO流 (字符流和字节流两个大类)
查看>>
uefi与win8 (根据网络资料整理)
查看>>
Eclipse优化
查看>>
Log4j tutorial with Tomcat examples
查看>>
Kong 网关
查看>>