SOLVESPACE -- parametric 2d/3d CAD

(you are viewing a thread; or go back to list of threads)

Trying to build Windows binary from source (by Ante)
I would like tro try out a more recent version than the last release. Trying to build a Windows binary from source (under Ubuntu 18.04.1). Building either 32-bit or 64-bit gives me this error. Any ideas?

[ 13%] Building CXX object extlib/flatbuffers/CMakeFiles/flatc.dir/grpc/src/compiler/
[ 13%] Building CXX object extlib/flatbuffers/CMakeFiles/flatc.dir/grpc/src/compiler/
[ 13%] Linking CXX executable ../../bin/flatc.exe
[ 13%] Built target flatc
Scanning dependencies of target q3d_header
[ 13%] Generating q3d_object_generated.h
/bin/sh: 1: ../../bin/flatc.exe: Exec format error
extlib/q3d/CMakeFiles/q3d_header.dir/build.make:60: recipe for target 'extlib/q3d/q3d_object_generated.h' failed
make[2]: *** [extlib/q3d/q3d_object_generated.h] Error 2
CMakeFiles/Makefile2:224: recipe for target 'extlib/q3d/CMakeFiles/q3d_header.dir/all' failed
make[1]: *** [extlib/q3d/CMakeFiles/q3d_header.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
Mon Jul 1 2019, 03:46:58
(no subject) (by Mike O)
Are you using a cross-compiler ? Can't tell from the output above. Not sure how familiar you're with the topic, so I will just point out the obvious: you can't generate Windows binaries on Linux without using

1) compiler for the target platform (cross-compiler)
2) having all dependencies cross-compiled as well

Given it's a lot more tricky to cross-compile stuff, I'd recommend just getting a Windows environment with cygwin or similar, and compiling it on the target. Otherwise take a look at this and related Ubuntu packages :

gcc-mingw-w64-x86-64/xenial 5.3.1-8ubuntu3+17 amd64
GNU C compiler for MinGW-w64 targeting Win64
Mon Jul 1 2019, 11:28:51
(no subject) (by Ante)
Thanks for the resply. My bad. Should have written that I followed the instruction "Building on Linux: Building for Windows"
Tue Jul 2 2019, 09:07:39
(no subject) (by Mike O)
Ah, makes sense now. I tried those instructions, and I think it got a lot further than yours, but broke later on some known (according to Google) problem with mingw and DirectX.
Tue Jul 2 2019, 10:45:26
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2018 SolveSpace contributors. Most recent update Nov 22 2018.