IDE for compiling a Java C / C ++ project

I joined a project in which a running application includes Java, C, and C ++ code with some JNIs. So far, development has been done on Linux from a terminal with a dirty recursive make file structure. I recently imported this code into an IDE (Eclipse) and wondered. Is it better to have one project in Eclipse containing Java code and another separate project for C / C ++ code, or just in one Eclipse project? Why or why not? What would you recommend as the best way to achieve which option you are offering?

+4
source share
3 answers

I have one project in Eclipse that mainly uses C / C ++ code and additional scripting languages ​​- lua, python, bash-scripting and some parts of java. Create a makefile system, but now integrate the scons build system and delete the makefiles. So, Eclipse is good, and you do not need to create separate projects, you can create everything in one project.

+1
source

I would recommend exploring the mavenizing option of your projects. Perhaps you can create a multi-module project with some modules in the form of java projects, and others like C / C ++. Java projects in Maven work out of the box, with C / C ++ you can see here: Using Maven for C / C ++ projects . Then you can use your IDE (Eclipse, Netbeans) to accomplish the maven goals. I did not do this, its just an idea and it seems doable.

+1
source

In fact, java compilation is already separate from c / C ++. You just call gcc and javac separately in the makefile. Therefore, in eclipse, if you point your workspace to java source code, you can use the Eclipse IDE as a great editor and for compilation. You can compile your code again in a makefile or use the generated eclipse class files.

0
source

Source: https://habr.com/ru/post/1394460/


All Articles