Windows用cygwin和mingw编译librecad

本文档详细介绍了如何在Windows环境下使用Cygwin、QtSDK、Boost等工具搭建LibreCAD开发环境,并提供了从获取源代码到编译运行的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

How to built LibreCAD (master branch) on Windows.

From LibreCAD wiki
  1. Get and install Cygwin.
    See: http://www.cygwin.com/
  2. Get and install Qt SDK.
    See: http://qt.nokia.com/products/qt-sdk
  3. Get and install Boost library by doing the following operations:
    1. Get Boost library (boost_1_48_0.zip) using the following link:
      https://sourceforge.net/projects/boost/files/boost/1.48.0/
    2. In C:\, create a directory named "boost".
    3. In C:\boost\, unzip the boost library.
      Notes: When finished you will have the following directory:
      C:\boost\boost_1_48_0
  4. Get, built and install muParser library by doing the following operations:
    1. Get muParser library (muparser_v2_2_2.zip) using the following link:
      http://sourceforge.net/projects/muparser/files/muparser
    2. In C:\, create a directory named "muparser".
    3. In C:\muparser\, unzip muparser_v2_2_2.zip
      Notes: At this point you will have the following directory:
      C:\muparser\muparser_v2_2_2
    4. Start Qt Desktop using "Qt 4.8.0 for Desktop (MinGW)" shortcut.
    5. In Qt Desktop console, navigate to muParser build directory (C:\muparser\muparser_v2_2_2\build\), then type the following command to built muParser library:
      mingw32-make -fmakefile.mingw
  5. Get LibreCAD from GIT, doing the following step:
    1. Start a "Cygwin Terminal" using the supplied short cut.
      Notes: At this point, you are in C:\cygwin\home\<user>\ directory.
    2. In Cygwin Terminal, get LibreCAD master branch by typing the following command:
      git clone git://github.com/LibreCAD/LibreCAD.git
  6. Built and run LibreCAD, by doing the following operations:
    1. Start Qt Creator using the supplied short cut.
    2. Built LibreCAD using Qt Creator, by doing the following operations:
      1. In the menu, select "File"->"Open File or Project...".
      2. In "Open File", navigate to C:\cygwin\home\<user>\LibreCAD
      3. In "Open File", select librecad.pro, and then click on the "Open" button.
      4. In "Project Setup", check "Desktop" item, if not already checked.
      5. In "Project Setup", uncheck "Use Shadow Building", if not already unchecked.
      6. In "Project Setup", click on the "Finish" button.
      7. In menu, select "Build"->"Rebuild All".
        Notes: At this point, you will have to wait a lot of time to get LibreCAD built, and this is normal.
    3. Run LibreCAD from Qt Creator, by doing the following operations:
      1. Switch to "Projects" mode by clicking on associated icon that is located at left of Qt Creator window.
      2. Then, in "Desktop", select "Run".
      3. Then, in "Run configuration:", make sure "src" is selected.
      4. Run LibreCAD by selecting "Build"->"Run" in the menu.
Cygwin MinGW 都是针对 Windows 系统提供的一种开源软件包,它们帮助用户能在 Windows 上模拟 Linux 环境,以便于编写执行命令行工具,包括编译 C/C++ 应用程序,如 mjpg-streamer。 mjpg-streamer是一个实时的 MJPEG 视频流服务器,常用于创建网络摄像头监控系统。要在 Windows 上通过 CygwinMinGW 编译运行 mjpg-streamer,你需要按照以下步骤操作: 1. **安装 CygwinMinGW**: - 对于 Cygwin,访问cygwin.com 下载并安装最新版的 Cygwin 包含了 gcc(GNU Compiler Collection)等编译工具。 - 对于 MinGW,可以从 mingw-w64 官网下载适用于 Windows 的版本,重点安装包含 GCC 的工具链。 2. **下载 mjpg-streamer源码**: 从 GitHub (https://github.com/jorgenbrandt/mjpg_streamer) 获取 mjpg-streamer 的源代码。 3. **配置编译**: - 打开终端(对于 Cygwin)或命令提示符(对于 MinGW),进入 mjpg-streamer 源代码目录。 - 运行 `./configure` 来生成 Makefile(如果需要,可能需要先设置环境变量指向已安装的库) - 使用 `make` 命令编译源代码,生成可执行文件,例如 `make mjpg_streamer`。 4. **运行 mjpg-server**: 创建一个新的批处理文件(`.bat` 文件)来执行 mjpg-streamer,因为直接从命令行输入可能会遇到路径问题。例如: ``` mjpg_streamer -i "input_uvc.so -d /dev/video0" -o "output_http.so -w ./webpage.html" ``` 这里 `-i` `-o` 后面的参数分别指定了输入设备输出到 HTTP 服务器的方式。 5. **启动服务**: 双击批处理文件,mjpg-streamer 就会在本地起一个服务器,并监听指定的端口。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值