Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Eclipse CDT Cross-compile OSX->Linux

Hello list,

I have a lot of linux-only C and C++ Makefile-based projects but want to use CDT under OSX.
I have several choices other like a vmware desktop box with Linux, but I do prefer the native experience (better filesystem access, better UI, retina fonts etc etc)

So, I want to set up some kind of Cross GCC toolchain which works on OSX (10.11) and the target is Linux x86_64.

In our projects, we have been using docker for defining cross-compilation environments. So there exists a docker image with our full build environment, which we use everywhere. I managed to use that just fine by changing the build command to a wrapper script which runs 'make' inside that docker image and passes along all the args CDT gave.

What is not always working is the C/C++ indexing/comprehension inside CDT since it's using the wrong header files. It should use the Linux variants of system include headers and libstdc++ headers from GCC for comprehending code.

Can I build upon the docker images above somehow by giving CDT access to an extracted docker image filesystem for the include headers?

As a first step I got rid of some problems by switching to GCC from clang inside CDT since our project uses GCC. But how to get the proper headers? Note again that building works fine, I just need all the header files. I think so at least. 

How would you go about working in CDT on OSX for Linux-only projects?

Back to the top