Discussion:
[Boost-users] cross compile application include boost-lib
Thomas Schmiedl
2016-12-24 15:49:18 UTC
Permalink
I have now installed Ubuntu 16 with libboost-all-dev and mips-toolchain
(from freetz.org). Compiling for intel works without problems.

When I change to gcc/g++ from the mips-toolchain, I got these error
during make:

Scanning dependencies of target RepetierServer
[ 4%] Building CXX object
CMakeFiles/RepetierServer.dir/Repetier-Server/main.cpp.o
/home/user/Repetier-Server/Repetier-Server/main.cpp:21:37: fatal error:
boost/program_options.hpp: No such file or directory
#include <boost/program_options.hpp>
^
compilation terminated.

The file /usr/include/boost/program_options.hpp exists.

I added these lines in CMakeLists.txt:

set(CMAKE_C_COMPILER
"/home/user/freetz/toolchain/target/bin/mips-linux-gcc")
set(CMAKE_CXX_COMPILER
"/home/user/freetz/toolchain/target/bin/mips-linux-g++")
SET(BOOST_INCLUDEDIR "/usr/include")
SET(BOOST_LIBRARYDIR "/usr/lib/i386-linux-gnu")

Thanks for help.

Thomas
-----Original Message-----
Sent: 20 December 2016 22:57
Subject: [Boost-users] cross compile application include boost-lib
Hello,
I try to use this application
https://github.com/repetier/Repetier-Server on my mips-based router.
Sorry, I'm not a developer. Please could someone explain the
cross-compiling steps for Linux (I use Ubuntu 14 x86 as build system).
gcc/g++ toolchain for mips is from this project
http://freetz.org/wiki/help/howtos/common/newbie.en.
Do I have also to cross-compile boost for mips or only install the
Ubuntu-source-package (sudo apt-get install libboost-all-dev).
Many Boost libraries are header-only, so I would try just installing just the source for a start.
If that doesn't work, you might find that you also need a few Boost libraries built (chrono, system perhaps). You can then install
pre-built libraries and add whatever is necessary to link to these.
The Ubuntu install process may not be the most recent version (and you don't have the most recent Ubuntu for that matter ;-). so
you might need to install Boost using the instructions on the Boost website, and also either build or download prebuilt libraries.
In general, the most recent versions have the least bugs ;-)
Good luck!
Paul
---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Loading...