-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building With Visual Studio 2017 #720
Comments
|
Thanks, I have updated the wiki with that "older downloads" link.
https://github.com/prusa3d/Slic3r/wiki/How-to-compile-Slic3r-Prusa-Edition-on-MS-Windows
…On Wed, Feb 14, 2018 at 10:29 AM, Merill ***@***.***> wrote:
All the Visual Studio 2013 download pages forward to 2017
try
https://www.visualstudio.com/vs/older-downloads/
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#720 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFj5I5EY94pJs9gZufUyU0jepMt8PBupks5tUqd4gaJpZM4SEr3G>
.
|
Is building with 2017 possible?
Likely it is, but you would have to compile the whole perl and all the perl
libraries yourself, which is a lenghty, manual process, which I don't
recommend to waste time with.
I hope we will get rid of the Perl dependencies before we will be forced to
depart from the Visual Studio 2013.
…On Wed, Feb 14, 2018 at 11:21 AM, bubnikv . ***@***.***> wrote:
Thanks, I have updated the wiki with that "older downloads" link.
https://github.com/prusa3d/Slic3r/wiki/How-to-compile-
Slic3r-Prusa-Edition-on-MS-Windows
On Wed, Feb 14, 2018 at 10:29 AM, Merill ***@***.***> wrote:
> All the Visual Studio 2013 download pages forward to 2017
>
> try
> https://www.visualstudio.com/vs/older-downloads/
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#720 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AFj5I5EY94pJs9gZufUyU0jepMt8PBupks5tUqd4gaJpZM4SEr3G>
> .
>
|
Hi, I needed to download and install cmake manually, is that correct (and may be missing in the wiki)? I'm still stuck at the
Any suggestions? Otherwise I'll check if I can find some space on my HD to install VS2013 tomorrow. |
yes, latest version was ok for me. |
Hi, thanks for the suggestions.
Ok, I'll try with VS2013 now ;-) |
With VS2013 I've got the same error. I've found out that the reason was #679, I was referencing the wrong TBB_LIBRARY (C:/local/tbb/lib/ia32/vc12 instead of C:/local/tbb/lib/intel64/vc12) Now SlicerPE opens and right now it is working =)
I've got them too, with VS2015 and VS2013 respectively. Is that normal? |
Not sure if the C4244 warning's are "normal" or not, but I did eventually get everything built and running with VS2013 and still got those warnings. |
There are some pull request to remove warnings. Ignore them for now. |
Regarding the missing environment variables in the perl starter batch file,
we will release updated perl packages.
@vojtechkral is working on integrating SSL networking into the C++ side, so
we will add another binary dependency likely the same way we added the TBB.
Now I do not know if it would have worked with VS2015...
Most likley not. Visual studio and likely most C++ compilers are known to
have incompatible C++ ABI between major versions. We provided binary builds
for the perl environment including the wxWidgets and the wxWidgets/Perl
bindings, and we will use this distro dependent on VS2013 until we are
forced to upgrade the visual studio, or better until we get rid of the Perl
completely.
So sorry, we will not support newer visual studios in the near term, as
long as we don't get a helping hand outside of Prusa Research.
If you are willing to help, there is a looong manual sequence documented of
how I compiled our Windows perl binary distro. You are most welcome to help
out and do that for VS2015 or VS2017, but be warned that it took me likely
a full working week to come up with the first build, and likely couple of
working days more to produce the binary perl zips, which all of us are
using.
https://github.com/prusa3d/Slic3r/wiki/Building-Perl-&-wxWidgets-with-Visual-Studio-2013
To support testing of your development builds, we may run our build server
against your fork on request. That way you will get a build of the same
format / content / size as our official builds, and they will be marked
with your github user name and your branch to be clearly differentiated.
This would require a bit of additional work from our side on the build
server and on the infrastructure, and we may need to beef up our build
server HW.
…On Wed, Feb 21, 2018 at 10:29 AM, Merill ***@***.***> wrote:
There are some pull request to remove warnings. Ignore them for now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#720 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFj5Iz3hwyHzchfG85RRLwvXnr01He2zks5tW-IHgaJpZM4SEr3G>
.
|
I was able to build perl and got maybe halfway through the supporting packages with VS2017 before deciding it wasn't worth the time right now. Perl itself actually compiled perfectly on the first try with nmake, so it's the packages that cause all the trouble.
Isn't there an SSL library in boost? |
Yes, but it's only a fairly thin wrapper on top of OpenSSL. I'm using libcurl instead (which also requires OpenSSL, but only on Linux et al., not on Windows and OS X, where it is able to use the native SSL implementation.) |
I am trying to build Prusa Slic3r with Visual Studio, too, and in order to not post a new issue over something that might be very obvious for somebody more experienced than me, I'm just adding it to this thread: So I followed the instructions and thanks to the people here I it worked for the most part. click here for the cmdline output
But What I'm really wondering though is how exactly I now load this into Visual Studio 13. I couldn't find any project files that can be opened with Visual Studio. The whole purpose of this is to use the IDE and it's debugger right? I tried several methods like importing the Slic3r folder into VS as a new project but If I doing so compiling within the IDE fails. So what's the right way or what am I missing? |
@N4rki Regarding Regarding Visual Studio project files, I am currently working on simplifying the build process, this is done in the http+build branch. I have written a preliminary how-to which is meant as an upgrade of the existing how-to. The branch contains some improvements that should provide Visual Studio debugging out of the box, if all goes well. This is described in the how-to. It is still in a somewhat work-in-progress state, but I've been getting good results on Windows and you can give it a try if you want. I'd certainly appreciate outside feedback. |
@vojtechkral Thank you for that quick response. I've been working on it for a while now trying out different things. So I got it to build successfully with my initial wperl64d + local folder setup taken from here. What made all the difference was simply taking your command So next up I followed your how-to with your new libaries and it worked well. So the easiest way to pass parameters to the main function of slic3r.cpp is to go right click on "slic3r" -> properties -> config properties -> Debugging -> insert desired commands in "Command Arguments" line. Is this correct? I had to look that up first so maybe it can be included as well. Now this is where the confusion starts: If I pass the arguments "torus.stl" "--export-svg" "--layer-height 0.2" the program runs until the end but not a lot happens. There are a few PDB files that are not found. I don't know if that's an issue. Here's the command box output:
Only then I realized that most of the code in slic3r.cpp is disabled through a `#if 0 (...) #endif` clause. When comment out these two statements and try to build. I get 122 errors. Is there a way to make all of it compile? Why is most of the code in slic3r.cpp disabled anyway? And lasty, I assumed that the whole program can be debugged via Visual Studio, so including the gui and being able to interactively use slic3r while running it from the IDE. This seems not to be the case, or am I missing something? So the best case scenario is to get the CLI only version running in Visual Studio? Anyway you already made it so much easier to get to where I am at right now so big up for that! The reason of my inquiry is to get this working with alexrj's slic3r. I need the extended svg and 3mf functionality for my Bachelor Thesis. I'm trying to implement slicing multi-material 3MF to svg vectorfiles that have different colours for each material. So it can be distinguished in further processing for DLP and Inkjet. |
@N4rki Thanks for testing this! As you probably already know my changes are merged in the master now. Anyway, those missing PDB files are not an issue, that's just some system libraries. As for running the slic3r, it is always run through perl. There is no standalone C++ main function (at least not yet), and so you run the slic3r as
Yes, that's the idea.
The upstream slic3r doesn't use CMake, so probably most of our how-to is not applicable. |
Okay thanks for clearing all that up :) I'm starting to understand the whole concept now. We have to attach Visual Studio to the created perl - slic3r process in order for it to work right? So Debug -> Attach to process -> select the perl interpreter. This way it works, my breakpoints are getting hit etc. So you might want add that detail to the guide :) |
@N4rki Attaching may work as well, but I aim for that to not be necessary, MSVC should be able to launch slic3r through the Perl process. However there was a bit of a bug with my MSVC setup which I'm fixing now and I'll publish the changes in a bit... |
@N4rki The fixes are now integrated, debugging should now hopefully be smoother... |
The slic3r.cpp is there for the future, to be a base for the command line only slic3r. As of now, this piece of code is unused in our fork. As you likely already found out, our fork has to be started through the perl interpreter. |
@vojtechkral updated the CMake scripts. Does this work for you? |
No response for a month. We believe our build process with Visual Studio 2013 is described with sufficient detail now. Closing. |
Hi bubnikv, sorry for not getting back; that message whether it worked now for me somehow slipped through the cracks. I just cloned the newest master and followed the instructions in the guide.
I get the same error when I try to run via I'm not in need to build Slic3r PE anymore, but this might be helpful to you. Its probably something minor as I had it working by 'attach to process' previously. As I had explained my main focus lies in the upstream Slic3r because of the 3mf capabilities as well as slicing to SVG. But to this day I couldn't get any good setup working to debug it, even GDB is no good because of perl. So I'm using an editor to code, compile the whole thing after each change and use CLI printouts to know what's happening. This made it really tough for me, especially since I haven't done anything with perl or c++ before. Would be so good if what you did was somehow transferable to the upstream Slic3r but I think there is quite some work and restructuring needed right?
|
VS2017 compilation (under VS2019 dev console) ends in failure to find BOOST libraries:
Enviroment:
|
@PetrGasparik i manually set these on cmake-gui, linking to the deps build directory (built with vs2017) It works. |
Version
version_1.40.0-alpha-1-g6e80a91
Operating system type + version
Windows 10
Behavior
I'm trying to build this on Windows with VS 2017 and Strawberry Perl. Has this been done before? I'm running into quite a bit of trouble. Here's where I am so far:
perl Build.PL
runs okperl Build.PL --gui
fails because Wx won't install. After digging through the logs, it turns out that it's Alien::wxWidgets trying to build wxwidgets, but the prdownloads.sourceforge.net site is returning a 403 (down?). So I manually download wxwidgets 3.0.2 source, and populate the Alien directory manually, which it auto detects when I manually build Alien:wxWidgets (http://search.cpan.org/dist/Alien-wxWidgets/README.txt). This allows Wx to install.cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
This fails because it can't find libperl. Not sure why, but one solution is to spoon feed it the libperl library:
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DPERL_LIBRARY=C:/Strawberry/perl/lib/CORE/libperl526.a
Now it can't find TBB (I have it in the recommended c:/local/tbb). Solution: update to latest
FindTBB.cmake
file (https://github.com/justusc/FindTBB) and feed it the cmake directory. So now the command looks like this:cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DPERL_LIBRARY=C:/Strawberry/perl/lib/CORE/libperl526.a -DTBB_ROOT_DIR=c:/local/tbb
Now that works.
nmake
fails with dozens of errors (warning C4244: 'initializing': conversion from 'double' to 'coord_t', possible loss of data). I am running the TBB 2018 Update 2, and boost 1.63 for lib64-msvc-14.0. The final nmake error:NMAKE : fatal error U1077: 'C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1411~1.255\bin\Hostx64\x64\cl.exe' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop.
All the Visual Studio 2013 download pages forward to 2017, so it doesn't seem like 2013 is available anymore. Is building with 2017 possible?
The text was updated successfully, but these errors were encountered: