Compiling and interpreting the source code of Curaengine three-dimensional slicing

Source: Internet
Author: User
Tags mkdir posix git clone
Cygwin compiling Curaengine Description

Since many cheese are starting with Cygwin/mingw to compile Curaengine, and with the various problems of the VS compiler curaengine, they try to compile with Cygwin64.
The benefits of compiling curaengine under Windows with the UNIX compilation environment are as follows: basically no need to modify the source code. Can be synchronized with the official library at any time. VS charge (of course it's not a good thing)A few notes.This tutorial compiles curaengine with Cygwin, and it's very smooth, much simpler than VS. Some people think that MinGW can also be used to compile curaengine, not recommended here. Because the GCC version of MinGW is currently only available to 4.8.1 (at least I downloaded the version up to 4.8.1), and Curaengine's latest version seems to use 4.9, I don't guarantee that there is no weird problem.
If you must use MinGW, remember to use the POSIX version of MinGW, with the POSIX version, with the POSIX version (important things say three times), why? Because the library for thread is not fully supported in other versions of MinGW, the mutex file is used with an error. And Libarcus just used this (don't ask me why I know ...) )。 Cygwin now the latest version seems to support Chinese, but it is best to install Cygwin in the English directory, add environment variables. The installation disk space needs to be large enough, I have installed all the components of the Cygwin64 with more than 50 GB (of course, compiled curaengine do not need to recommend a full installation, specifically need to install which plug-in reference group documents). Test environment WIN10 64-bit Chinese Professional Edition, DELL Inspiron 17R, you may need to install additional perl,cmake,python,git etc. (I have before).Recommended SoftwareCygwin I use the following version, the latest GCC has come to 4.9.3 \ \ Update I chose from the Internet and install, the school's education network speed is relatively fast. CMake https://cmake.org/, the newer the better ConEmu http://www.softpedia.com/get/System/System-Miscellaneous/ConEmu.shtml
"The following software does not have to" simulate the functions of the terminal under Windows, you can run Cygwin inside. Wox http://www.getwox.com/is similar to Alfred under Mac OS and is used to quickly start a program. spacemacs! Https://github.com/syl20bnr/spacemacs highly recommended. Emacser and Vimer would love that. Before using the VS version of Cuaengine because there is no good IDE, now there is no reason to use vs. Spacemacs is a perfect configuration file for emacs+. Emacs entry threshold is higher, but once used will benefit lifetime. Zeal http://zealdocs.org/similar to the Mac OS Dash, you can view the documentation with SPACEMACS. With the F1 key function of the VS is almost oh hehe.compiling Curaengine Description

Https://github.com/Ultimaker/CuraEngine in fact, follow the official instructions step-by-step, during the period need to correct some of their own errors (because Cygwin did not fully simulate the UNIX environment) compiled Protobuf

git clone https://github.com/google/protobuf.git #下载 protobuf Library
Uncomment line-to-line #注释掉 19 lines to 38 lines (some changes may be in line number) and remove the reliance on gtest.
./autogen.sh

./configure

Make

Make install

compiling the Libarcus library

git clone https://github.com/Ultimaker/libArcus.git
mkdir Build && CD Build
CMake.

Make

Make install  is installed by default under/usr/local

compiling the Curaengine library

git clone https://github.com/Ultimaker/CuraEngine.git
mkdir build && CD build
cmake.
Make

The above image is the result of a successful final compilation. Make process has several errors, you need to modify the source code curaengine. CommandSocket.cpp

if (setting.name () = = "Extruder_nr")   //192 line
        {
            extruder_train_nr = Std::stoi (Setting.value ());
            break;
        }

Change to:

if (setting.name () = = "Extruder_nr")   
{
   std::string temp = Setting.value ();
   EXTRUDER_TRAIN_NR = Strtol (Temp.c_str (), 0,10);
}


and # include <stdlib.h> SettingRegistry.cpp

settingconfig& child = Category_trains.getorcreatechild (std::to_string (TRAIN_NR

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.