

This is a note on writting C/C++ programs with the help from Eclipse and CDT.
CREATE A MAKEFILE FOR C PROGRAM DOWNLOAD
Download an-executable-project.zip - 2.8 KB.Download a-static-library-project.zip - 7 KB.You may have to first uncheck "Display compatible toolchains only". You can fix this by selecting a tool chain in Project -> C/C++ Build -> Tool Chain Editor. I just tried importing a Makefile project without selecting a tool chain for the Indexer and $(COMMAND) was empty. Likely the definition was skipped over somehow. You could try using the -E option on your compiles to get the preprocessor output for the hilbert.c file
CREATE A MAKEFILE FOR C PROGRAM CODE
I don't have your code nor the inclination to delve into it.īesides it's technically off topic here as it likely has nothing to do with CDT itself. In the dialog for Importing a makefile project the bottom pane is used to select the tool chain for the Indexer.Īs for the bitmask_t problem, you'll have to track down why it's undefined yourself. Here is a partial of how they look on the Entries tab:

Selecting a GCC provider will automatically use GCC as the compiler. I've selected the builtins provider to show its parameters. It may not be obvious but only the first three are checked. That the indexer is unaware of system functions like sqrt implies the compiler builtins are still needed for some reason. I've never had to modify anything o get a build except for the build directory.Īfter you add the headers, you may need to rebuild the index. Only the indexer should care what compiler you are using. Well I don't know since I don't know what exactly you are doing.įor example, you said you imported the code as a Makefile project. You cam use other make targets which you can create, select and execute using the Build Targets view. It will append these to the make command as appropriate. To get Eclipse to use them you need to set the make command and build directory inĮclipse has two builtin targets: all and clean. Its default configuration will scan the output from GCC, g++ and clang. You can modify the command for this as needed.Īnother of the providers is the GCC Build Output Parser which will "discover" the paths after a build. One of the providers can be the GCC Built-in Compiler Settings. Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc.

You do this by enabling the appropriate Discovery providers or providing the include paths as User Entries. You still have to inform the Indexer of the locations of the header files (yours and the system's) somehow.

That means that everything in the Makefile is your responsibility.Īnd further means it is irrelevant that Eclipse is unaware of mpicxx or what compiler is being used.Īlmost, anyway. You imported your code as an existing Makefile project.
