How to create Eclipse project files?

I’m trying to create an Eclipse project for Blender so I can use the really awesome callgraph feature(or addon, I don’t remember which) that I saw on the internet.

I’m using Windows 10, CMake, and MinGW. Within CMake I’m using the “Eclipse CDT4 - MinGW Makefiles” generator

I’ve tried to configure project files but I get this error:

The C compiler identification is GNU 8.2.0

The CXX compiler identification is GNU 8.2.0

Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.

Check for working C compiler: C:/MinGW/bin/gcc.exe

Check for working C compiler: C:/MinGW/bin/gcc.exe -- works

Detecting C compiler ABI info

Detecting C compiler ABI info - done

Detecting C compile features

Detecting C compile features - done

Check for working CXX compiler: C:/MinGW/bin/g++.exe

Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works

Detecting CXX compiler ABI info

Detecting CXX compiler ABI info - done

Detecting CXX compile features

Detecting CXX compile features - done

Performing Test SUPPORT_SSE_BUILD

Performing Test SUPPORT_SSE_BUILD - Failed

SSE Support: missing.

Performing Test SUPPORT_SSE2_BUILD

Performing Test SUPPORT_SSE2_BUILD - Failed

SSE2 Support: missing.

Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.20.1.windows.1")

CMake Error at build_files/cmake/platform/platform_win32.cmake:29 (message):
Compiler is unsupported
Call Stack (most recent call first):
CMakeLists.txt:886 (include)

Btw, I took out C:\MinGW\msys\1.0\bin\sh.exe because CMake complained about it (I don’t know what I’m doing).

I, at least, would like some project files to allow me to browse the code, but it would be nice to build Blender with Eclipse also.

How do I create Eclipse project files ?

Also, I’ve installed the callgraph plugin that you get through the Marketplace Wizard, and it’s not showing up in the Profiling Tools menu or anywhere that I can see. Would anyone happen to know how to get the call graph to work?

Project files can be created via command line cmake tool passing the -G option and the name of the generator

https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html

using this command will generate the Eclipse project you want. The error you get is a compiler issue , unfortunately I am not familiar with this compiler because I use the regular VS compiler on Windows 10 which is also the standard way to build Blender on Windows 10.

If you want to do it that way then you can unistall MinGW and install VS 2017 community edition (make sure python and Visual C++ are checked for installation ) which is a free download, from there on things should work as expected.

Blender does not support building with MinGW, only the Visual Studio compiler. It does not require you to use the Visual Studio IDE though.

Using the Eclipse NMake (slow) or Ninja (fast, need to install Ninja) generators instead may work.

Your answer is right here. Open platform_win32.cmake, and you’ll see that this file explicitly excludes all non-MSVC compilers on Windows.

You could try, at your own risk, to remove that section from platform_win32.cmake and see what happens then. I wouldn’t expect a working build, but if you’re lucky you may get your Eclipse files.

@kilon
@brecht
@StefanW

Thanks everyone. I attempted everyone’s suggestions and I could not complete a buildable Eclipse project or one that had the file structure (i.e. modules) that is found in the VS .sln file . I got the furthest with brecht’s suggestion though. I did however create an Eclipse project for Blender though.

No big deal, I mostly just wanted to use Eclipse’s callgraph addon. It looked really nice.

1 Like