Open lordofhyphens opened 6 years ago
When doing step 1:cmake --build . -- -j4 i get the following errors.
CMakeFiles\slic3r.dir/objects.a(slic3r.cpp.obj): In function `__static_initialization_and_destruction_0':
C:/dev/boost_1_63_0/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
<snip> -- long list of repeated undefined reference errors -- </snip>
Makefile:82: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
@EitanSomething Looks to me like boost didn't build right on your system.
@EitanSomething update your slic3r source checkout and delete/remake your build directory. I've made boost a hard requirement so if it doesn't detect right it'll die earlier.
When doing step 10 I get CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindBoost.cmake:2044 (message): Unable to find the requested Boost libraries.
Boost version: 1.63.0
Boost include path: C:/dev/boost_1_63_0
Could not find the following Boost libraries:
boost_system
boost_thread
boost_filesystem
Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. Call Stack (most recent call first): CMakeLists.txt:50 (find_package)
@EitanSomething I'd rebuild Boost then and make sure you used gcc to build it (instead of MSVC). CMake's telling you what is wrong and what it can't find.
The Slic3r Wiki instructions will work so long as the version of GCC you are using is first in the PATH (or the only gcc in your path).
Related discussion somewhere else
Clean up your environment and figure out what is going on, I can't help you anymore unless you sort out your system environment. Remove other MinGW installs, make sure MinGW is in your PATH variable. Ensure Boost is built.
As a last resort you could probably overwrite C:\dev\boost_1_63_0 with https://bintray.com/lordofhyphens/Slic3r/download_file?file_path=boost_1_63_0-x64-gcc-6.3.0-seh.7z
It may work, or it may not (it probably won't).
Figured it out. I needed to rename files in C:\dev\boost_1_63_0\stage\lib libboost_system-mgw63-mt-s-1_63.a ->boost_system.a libboost_thread-mgw63-mt-s-1_63.a ->boost_thread.a libboost_filesystem-mgw63-mt-s-1_63 .a -> boost_filesystem.a
@EitanSomething I'm glad it worked out for you, but that should not have been necessary.
At least now we know it could happen
Is this normal
I've seen it; the operation on Windows is barely tested. So no, it should not happen, but it probably isn't something incorrect in your environment.
Since you are primarily working on Windows you can figure it out (or ignore it until I get to it).
Same problem with @EitanSomething .
in My case : I rename
libboost_filesystem-mgw73-mt-s-1_63.a => libboost_filesystem-mgw73-mt-1_63.a libboost_system-mgw73-mt-s-1_63.a => libboost_system-mgw73-mt-1_63.a libboost_thread-mgw73-mt-s-1_63.a => libboost_thread-mgw73-mt-1_63.a
And the result
D:\MyApps\Slicer\Slic3r\build>cmake -G"MinGW Makefiles" ..\src\ -DBOOST_ROOT=C:\dev\boost_1_63_0 -DSLIC3R_STATIC=1
-- Boost version: 1.63.0
-- Found the following Boost libraries:
-- system
-- thread
-- filesystem
wx found!
-- Configuring done
-- Generating done
-- Build files have been written to: D:/MyApps/Slicer/Slic3r/build
I also have wxWidget debug alert .
I have updated the issue with a short list of minimum standards and guidelines. Code that is submitted that doesn't meet these will be required to change before it is merged.
Trying to get this to work using visual Studios
@EitanSomething You are largely on your own with that (although you could probably reference some of the work on Prusa3d, as they do their debug on VS IIRC).
@lordofhyphens , what IDE you used to build this CPPGUI ?
We currently aren’t using an IDE, but I am trying to get it to work with Visual studios 2017
@robbycandra I don't use an IDE and I don't plan to officially support one. I use CMAKE to build, my editor is gvim.
I'm getting this error when building slic3r. I'm using Windows 10 Home MINGW 7.3.0 boost 1.63.0 wxwidgets 3.1.1 cmake 3.13.1
liblibslic3r.a(AMF.cpp.obj):AMF.cpp:
(.rdata$.refptr._ZN5boost6nowide4cerrE[.refptr._ZN5boost6nowide4cerrE]+0x0): undefined reference
to `boost::nowide::cerr'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: *** [CMakeFiles\slic3r_test.dir\build.make:308: slic3r_test.exe] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:495: CMakeFiles/slic3r_test.dir/all] Error 2
mingw32-make.exe: *** [Makefile:94: all] Error 2
Odd, cmake should be compiling in nowide.
Could you pull from slic3r/Slic3r:cppgui and give it a try?
I built slic3r/Slic3r:cppgui and I get
C:\Users\Eitan\Documents\slic3r-cppgui\xs\src\boost\nowide\iostream.cpp:9:10: fatal error:
boost/nowide/iostream.hpp: No such file or directory
#include <boost/nowide/iostream.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make.exe[2]: *** [CMakeFiles\boost-nowide.dir\build.make:63: CMakeFiles/boost-
nowide.dir/C_/Users/Eitan/Documents/slic3r-cppgui/xs/src/boost/nowide/iostream.cpp.obj] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:413: CMakeFiles/boost-nowide.dir/all] Error 2
mingw32-make.exe: *** [Makefile:94: all] Error 2
I bet I missed a spot when I pulled apart the include definitions.
Odds are the target definition for boost nowide just needs an include directory added for ${LIBDIR}
I’ve tried to fix it, but haven’t succeeded so can you try to fix the issue.
I will just run slic3r in a virtual machine until the errors are fixed
I don't usually develop at all on Windows, so figuring out weird linking issues because Windows is usually the last on my list of things to do.
Also you should be using Slic3r/Slic3r:cppgui
On Wed, Dec 5, 2018, 11:27 AM EitanSomething <notifications@github.com wrote:
I will just run slic3r in a virtual machine until the errors are fixed
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lordofhyphens/Slic3r/issues/31#issuecomment-444570772, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB8CoppM0HH5kJ7d5hRt3TZ6g467vU2ks5u2AH8gaJpZM4T_8sm .
I am pushing an update now for this in the build system. It was just adding 2 lines to CMakeFiles.
On Wed, Dec 5, 2018, 1:40 PM Joe Lenox <lordofhyphens@gmail.com wrote:
I don't usually develop at all on Windows, so figuring out weird linking issues because Windows is usually the last on my list of things to do.
Also you should be using Slic3r/Slic3r:cppgui
On Wed, Dec 5, 2018, 11:27 AM EitanSomething <notifications@github.com wrote:
I will just run slic3r in a virtual machine until the errors are fixed
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lordofhyphens/Slic3r/issues/31#issuecomment-444570772, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB8CoppM0HH5kJ7d5hRt3TZ6g467vU2ks5u2AH8gaJpZM4T_8sm .
@EitanSomething https://github.com/slic3r/Slic3r/commit/cd80dacf8b76a3becd6a6284b0e04060896458d3 builds on my system now (that I have it put back together).
the slicer.exe says the gui has not been built.
Configure with -DEnable_GUI
On Wed, Dec 5, 2018, 7:56 PM EitanSomething <notifications@github.com wrote:
the slicer.exe says the gui has not been built.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lordofhyphens/Slic3r/issues/31#issuecomment-444719972, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB8Cpjlvs_sMb4b8KZG7Pt7gRndJuUKks5u2HlMgaJpZM4T_8sm .
I get errors a bunch of errors when Enabling the GUI
C:In file included from C:/dev/wxWidgets-3.1.1-static/include/wx/glcanvas.h:324:0,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/Scene3D.hpp:8,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Dialogs\ObjectCutDialog.hpp:7,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Dialogs\ObjectCutDialog.cpp:1:
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:104:40: error: 'PIXELFORMATDESCRIPTOR' has not been declared
PIXELFORMATDESCRIPTOR ppfd = NULL);
^~~~~
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:107:42: error: 'PIXELFORMATDESCRIPTOR' has not been declared
PIXELFORMATDESCRIPTOR pfd = NULL);
^~~~~
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:171:17: error: 'PIXELFORMATDESCRIPTOR' has not been declared
int DoSetup(PIXELFORMATDESCRIPTOR &pfd, const int attribList);
^~~~~
In file included from C:/dev/wxWidgets-3.1.1-static/include/wx/glcanvas.h:324:0,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/Scene3D.hpp:8,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Plater/Plate3D.hpp:8,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Plater.hpp:25,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\MainFrame.hpp:16,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\GUI.cpp:11:
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:104:40: error: 'PIXELFORMATDESCRIPTOR' has not been declared
PIXELFORMATDESCRIPTOR ppfd = NULL);
^~~~~
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:107:42: error: 'PIXELFORMATDESCRIPTOR' has not been declared
PIXELFORMATDESCRIPTOR pfd = NULL);
^~~~~
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:171:17: error: 'PIXELFORMATDESCRIPTOR' has not been declared
int DoSetup(PIXELFORMATDESCRIPTOR &pfd, const int attribList);
^~~~~
In file included from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Plater.hpp:25:0,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\MainFrame.hpp:16,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\GUI.cpp:11:
C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Plater/Plate3D.hpp:43:5: error: 'uint' does not name a type; did you mean 'u_int'?
uint hover_volume, hover_object, moving_volume;
^~~~
u_int
In file included from C:/dev/wxWidgets-3.1.1-static/include/wx/glcanvas.h:324:0,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/Scene3D.hpp:8,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/Plater/Plate3D.hpp:8,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/Plater.hpp:25,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/MainFrame.hpp:16,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/GUI.hpp:4,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Dialogs\PresetEditor.cpp:3:
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:104:40: error: 'PIXELFORMATDESCRIPTOR' has not been declared
PIXELFORMATDESCRIPTOR ppfd = NULL);
^~~~~
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:107:42: error: 'PIXELFORMATDESCRIPTOR' has not been declared
PIXELFORMATDESCRIPTOR pfd = NULL);
^~~~~
C:/dev/wxWidgets-3.1.1-static/include/wx/msw/glcanvas.h:171:17: error: 'PIXELFORMATDESCRIPTOR' has not been declared
int DoSetup(PIXELFORMATDESCRIPTOR &pfd, const int *attribList);
^~~~~
In file included from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/Plater.hpp:25:0,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/MainFrame.hpp:16,
from C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/GUI.hpp:4,
from C:\Users\Eitan\Documents\slic3r-cppgui\src\GUI\Dialogs\PresetEditor.cpp:3:
C:/Users/Eitan/Documents/slic3r-cppgui/src/GUI/Plater/Plate3D.hpp:43:5: error: 'uint' does not name a type; did you mean 'u_int'?
uint In member function 'virtual bool Slic3r::GUI::App::OnInit()
Don't know what is going on with the errors in wxWidgets itself, odds are the Plate3D error need includes of cstdint, the include rules are slightly different between different compilers.
Remember that the c++ GUI is experimental and I currently do not guarantee that it works on all platforms.
I built it in an ubuntu virtual machine when I open it an everything works.
Preamble
If you're here to get started on working on Slic3r, thank you!
The Windows instructions were developed with my laptop.
Linux instructions were developed through my setup for Travis CI (the build server) and my main development workstation (running Debian sid). OSX instructions were developed through the Travis CI setup (build server). They have not been tested by me on a local OSX system (yet).
Coding Standards (incomplete)
auto*
if referring to a pointer.Code Checkout
Here's how to get going for the purposes of assisting with the CPPGUI port.
If you are planning on contributing code you should create a fork to stage your code:
git clone https://github.com/lordofhyphens/Slic3r -b cppgui slic3r-cppgui
git remote add me https://<username>@github.com/<username>/Slic3r
To get updates that I or other people have done:
git pull origin cppgui
To get your code into
lordofhyphens/slic3r
git push me cppgui
<username>/Slic3r
tolordofhyphens/Slic3r
cppgui branch.General notes
If you have problems with CMake not figuring out the build settings, you need to delete and re-create the build folder before trying again.
If you see
/path/to/Slic3r
this means replace that text with where you checked out Slic3r.Windows Build Instructions
C:\dev
in the instructions with the new path.mkdir C:\dev\wxwidgets-3.1.1-build
cd C:\dev\wxwidgets-3.1.1-build
cmake -G"MinGW Makefiles" C:\dev\wxwidgets-3.1.1-src -DwxBUILD_SHARED=OFF -DCMAKE_INSTALL_PREFIX=C:\dev\wxWidgets-3.1.1-static
cmake --build . --target install -- -j4
(reference: http://docs.wxwidgets.org/3.1/overview_cmake.html)mkdir /path/to/Slic3r/build
cd /path/to/Slic3r/build
cmake -G"MinGW Makefiles" ..\src\ -DBOOST_ROOT=C:\dev\boost_1_63_0 -DSLIC3R_STATIC=1
Expected output from CMake:
cmake --build . -- -j4
Linux
cd
to the Slic3r checkout.mkdir build
cd build
cmake ../src
cmake --build .
-- -j4
to build with 4 threads.OSX
brew install wxmac
brew install boost
cd
to the Slic3r checkout.mkdir build
cd build
cmake ../src
cmake --build .