简体   繁体   English

适用于Java C / C ++项目编译的IDE

[英]IDE for Java C/C++ Project Compilation

I have joined a project where the application being worked on involves Java, C, and C++ code with some JNI. 我加入了一个项目,其中正在处理的应用程序涉及带有某些JNI的Java,C和C ++代码。 Up until now, development was done in Linux from the terminal with a messy recursive makefile structure. 到目前为止,开发工作是从Linux的终端通过杂乱的递归Makefile结构完成的。 Recently, I have been importing this code into an IDE (Eclipse) and was wondering something. 最近,我一直将此代码导入到IDE(Eclipse)中,并且对此有所疑问。 Is it best to have one project in Eclipse containing the Java code and another separate project for the C/C++ code or everything in one Eclipse project? 最好在Eclipse中有一个包含Java代码的项目,而在C / C ++代码中有另一个单独的项目,或者在一个Eclipse项目中拥有所有项目? Why or why not? 为什么或者为什么不? What would you recommend as the best way to achieve whichever option you suggest? 您会推荐什么作为实现建议的最佳方法?

I would recommend researching the option of mavenizing your projects. 我建议研究研究项目的方案。 Possibly you can create a multimodule project with some modules as java projects and others as C/C++. 可能您可以创建一个多模块项目,其中一些模块为java项目,而其他模块为C / C ++。 Java projects in Maven work out of the box, with C/C++ you can have a look here: Using Maven for C/C++ projects . Maven中的Java项目是开箱即用的,使用C / C ++可以在这里查看: 将Maven用于C / C ++项目 You can then use your IDE (Eclipse, Netbeans) to execute maven goals. 然后,您可以使用IDE(Eclipse,Netbeans)执行Maven目标。 I haven't done it, its just an idea and seems doable. 我还没有做到,只是一个想法,似乎可行。

I have single project in Eclipse which mainly use C/C++ code and additional scripting languages - lua, python, bash-scripting and some pieces of java. 我在Eclipse中有一个项目,该项目主要使用C / C ++代码和其他脚本语言-lua,python,bash脚本和一些Java脚本。 Build system - makefile, but currently integrate scons build system and remove makefiles trash. 构建系统-Makefile,但当前集成了scons构建系统并删除Makefile垃圾。 So, Eclipse is good and you don't need to create separate projects, you can create all in one project. 因此,Eclipse很好,您无需创建单独的项目,而可以在一个项目中全部创建。

Actually compilation of java is already separate from c/c++. 实际上,java的编译已经与c / c ++分开了。 You are just calling separately gcc and javac in makefile. 您只是在makefile中分别调用gcc和javac。 So in eclipse if you point your workspace to your java source code, you can use Eclipse IDE as an great editor and for compilation. 因此,在eclipse中,如果将工作空间指向Java源代码,则可以将Eclipse IDE用作出色的编辑器并进行编译。 You can again compile your code in makefile or use generated class files of eclipse. 您可以再次在makefile中编译代码或使用eclipse生成的类文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM