FreeOpcUa / freeopcua

Open Source C++ OPC-UA Server and Client Library
http://freeopcua.github.io/
GNU Lesser General Public License v3.0
701 stars 339 forks source link

How to cross-build c++ freeOpcUa in Ubuntu to use for embedded ARM? #256

Open QHWG67 opened 7 years ago

QHWG67 commented 7 years ago

I would like to use the arm-linux-gcc complier to build the whole c++ project in Ubuntu OS of VirtualBox, use the results(.so etc) in embedded device. So how should I update the CMakeLists.txt file to use CMake to build them instead of using IDE? Many thanks!

RavilN commented 7 years ago

One of the options is VisualGDB: https://visualgdb.com/ With it, you can use Visual Studio (community edition) as main IDE, and from there use Ubuntu VM to build binaries for ARM target, then run and debug on your embedded device

On 13 July 2017 at 02:04, QHWG67 notifications@github.com wrote:

We would like to build this c++ freeOpcUa in Ubuntu OS and use the output to run in embedded ARM chip, how should I do? Could you pls give some suggestions?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FreeOpcUa/freeopcua/issues/256, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPNiWfUcCE1zNDDMweZ7inL0-ZSQX5Aks5sNc-lgaJpZM4OWo6L .

DavidZemon commented 6 years ago

This is a CMake question and not a freeopcua question. I recommend reading about cross-compiling with CMake and how to use Toolchain files. If you're a Docker fan, this can help too: https://github.com/dockcross/dockcross

And the reason I say with such confidence that it's not a freeopcua question is because I've built freeopcua for armv7hf without any problems or tweeks to the CMake scripts other than providing a toolchain file on the command line. Works great :)