简体   繁体   中英

Compiling a C++ library in Windows for Linux on Intel

Need to run the library OpenCV on a linux-based device (a Rexroth XM21). This one has an Intel Atom 32bit CPU. Would it be possible to compile the library for that device on Windows (also running on an Intel platform)? I have the sources to actually compile a windows DLL but that one cannot be used directly of course.

I already had bad experiences when I compiled it on a Raspberry Pi (ARM). Sadly the .so file from the Raspberry quits with an error due to the architecture incompatibility.

So is there any solution? Some sort of cross-compiling?

You can try a regular gcc build on Ubuntu for example. The easiest way is to install an Ubuntu ISO on a VirtualBox machine, if you don't have a native Linux machine available. The Intel Atom CPU should be compatible to the CPU of your PC. There are things that can get into your way though, for example if the target linux system uses an older version of libc. Doesn't the manufacturer provide a dedicated cross toolchain for the device?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM