找回密码
 立即注册
收起左侧

如何用QT编译QCAD源码

4
回复
11766
查看
[复制链接]
累计签到:53 天
连续签到:1 天
来源: 2016-4-12 22:45:23 显示全部楼层 |阅读模式
1Qter豆
如题,如何用QT编译QCAD源码

回复

使用道具 举报

累计签到:595 天
连续签到:1 天
2016-4-13 18:15:29 显示全部楼层
Checking out the QCAD Sources

To check out the QCAD source code, please clone our git repository as follows:
git clone git@github.com:qcad/qcad.git

Or (using HTTPs):
git clone https://github.com/qcad/qcad.git

The procedure to compile the source code depends on the platform you are on:
Windows
Mac OS X
Linux

If you are using Solaris, FreeBSD or an other unix system, the Linux instructions might also work for you.

Windows
1.Download and install a C++ compiler and Windows SDK, for example:
Visual Studio C++ Express
Microsoft Windows SDK for Windows 7 and .NET Framework 4

2.Download and install Qt (see supported platforms):
Download for example the ZIP file called qt-everywhere-opensource-src-4.7.4.zip
Extract the ZIP file
Configure Qt. E.g. on cygwin with: configure.exe -platform win32-msvc2010 -debug
or:
configure.exe -platform win32-msvc2010 -release


Compile Qt. E.g. on cygwin with nmake or jom:
nmake release

Add the path to the Qt binaries (for example C:\Qt\qt-everywhere-opensource-src-4.7.4\bin) to your PATH environment variable
Set environment variable QMAKESPEC to win32-msvc2010 or the appropriate downloaded version


3.Configure QCAD. For example on cygwin with:
cd /home/user/qcad
qmake -r


4.Compile QCAD. For example on cygwin:
nmake release

Alternatively, you may want to use jom, an nmake clone which speeds up compilation significantly by using all available CPU cores:

5.Launch QCAD. E.g. from cygwin with:
./release/qcad.exe


Mac OS X
1.Download and install the latest version of XCode for your platform.
2.Download and install Qt (see supported platforms):
Download for example the tar.gz file called qt-everywhere-opensource-src-4.8.4.tar.gz

Extract the tar.gz file:
tar xfvz qt-everywhere-opensource-src-4.8.4.tar.gz


Configure Qt:
cd qt-everywhere-opensource-src-4.8.4
./configure -fast -opensource -arch x86 -release \
-no-qt3support -qt-zlib -qt-libtiff -qt-libpng -qt-libmng \
-qt-libjpeg -confirm-license


Compile Qt:
make


Add ~/opt/qt-everywhere-opensource-src-4.8.4/bin to your PATH environment variable:
export PATH=~/opt/qt-everywhere-opensource-src-4.8.4/binPATH



3.Configure QCAD:
cd ~/qcad
qmake -r


4.Compile QCAD:
make release


5.Launch QCAD:
cd release
./QCAD.app/Contents/MacOS/QCAD


Linux
1.Check that you have the following (including dependencies) installed:
gcc version 4
make
libx11-dev
libxext-dev
libxrender-dev
libglu1-mesa-dev (Ubuntu)
libfreetype6-dev (Ubuntu)
libfontconfig1-dev (Ubuntu)
libssl-dev (Ubuntu)
libdbus-1-dev (Ubuntu)
libsm-dev (Ubuntu)
Mesa-devel (OpenSUSE)
dbus-1-devel (OpenSUSE)
libsm-devel (OpenSUSE)
glu-devel (OpenSUSE)

2.If you wish to compile / run QCAD 3 32bit on a 64bit Linux installation, you will also need:
ia32-libs
Mesa-32bit (OpenSUSE)

3.Download and install Qt (see supported platforms):
Download for example the tar.gz file called qt-everywhere-opensource-src-4.8.4.tar.gz

Extract the tar.gz file:
tar xfvz qt-everywhere-opensource-src-4.8.4.tar.gz


Configure Qt:
cd qt-everywhere-opensource-src-4.8.4
./configure -fast -opensource -release -no-qt3support -fontconfig -dbus \
-sm -qt-libpng -qt-libjpeg -qt-libmng -qt-zlib -openssl -opengl desktop \
-xrender -webkit -confirm-license


Compile Qt:
make


Add ~/opt/qt-everywhere-opensource-src-4.8.4/bin to your PATH environment variable:
export PATH=~/opt/qt-everywhere-opensource-src-4.8.4/binPATH



4.Configure QCAD:
cd ~/qcad
qmake -r


5.Compile QCAD:
make release


6.Launch QCAD:
cd release
LD_LIBRARY_PATH=. ./qcad-bin

回复

使用道具 举报

累计签到:595 天
连续签到:1 天
2016-4-13 18:16:04 显示全部楼层
http://www.qcad.org/en/component ... lation-from-sources
他介绍里面说的很详细怎么编啊
回复

使用道具 举报

累计签到:53 天
连续签到:1 天
2016-4-14 09:10:38 显示全部楼层
sywh 发表于 2016-4-13 18:16
http://www.qcad.org/en/component/content/article/78-qcad/111-qcad-compilation-from-sources
他介绍里 ...

已经可以编译了,但是我怎么发布自己编译的QCAD在其他电脑上也能使用?谢谢
回复

使用道具 举报

累计签到:53 天
连续签到:1 天
2016-4-14 11:41:31 显示全部楼层
sywh 发表于 2016-4-13 18:16
http://www.qcad.org/en/component/content/article/78-qcad/111-qcad-compilation-from-sources
他介绍里 ...

能够编译了,但有时候编译出现问题,就是编译好了,但是打开编译好的exe没有反应
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了