Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse does not recognize macros defined in CMake Project
Eclipse does not recognize macros defined in CMake Project [message #1758672] Fri, 31 March 2017 10:15 Go to next message
Eclipse UserFriend
use STM32CubeMX to generate initial codes and libraries to be used for STM32 microcontrollers. I know that there are some preconfigured
eclipse distrobutions out there, but for some reasons I don't want to use them.

Here I use a CMake script to generate makefile: https://github.com/nixmd/STM32CubeMX_cmake

This script compiles without problem and works nice in QtCreator and Kdevelop and provides autocomplete and lets them recognize every
variable/macro/function inside the project. But when it comes to eclipse, it becomes a mess.

I have tried a lot, but still doesn't work.
I have attached one of these projects here (without any modifications into the generated code). I also have placed CMake scripts inside the
root directory of project without runnig cmake command to generate makefile.

Folks please take a look into this files and help me to figure out what is wrong with it.

Thanks



  • Attachment: sample.zip
    (Size: 489.04KB, Downloaded 191 times)
Re: Eclipse does not recognize macros defined in CMake Project [message #1758791 is a reply to message #1758672] Mon, 03 April 2017 03:48 Go to previous message
Eclipse UserFriend
You might want to investigate using cmake4eclipse https://marketplace.eclipse.org/content/cmake4eclipse
And probably should read https://cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial#CMake_with_Eclipse

With the exception of perhas cmake4eclipse (I've never used it), you generally would use CMake to generate the makefile of a Makefile CDT project.

Note that cmake4eclipse is a third party plugin. It's not clear how to get support for it.
Previous Topic:Import CubeMx project in Eclipse
Next Topic:All but first arduino build does not work due to -.d file
Goto Forum:
  


Current Time: Wed Jun 25 01:58:46 EDT 2025

Powered by FUDForum. Page generated in 0.08872 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top