Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: gerardogleza on April 11, 2022, 11:29:31 am
-
Hi,
I am new in the forum but I have been using Code::Blocks sparcely (mainly in Linux). Now using Windows 10 Home, at my home laptop, with the las version of the IDE, I have created a Java project, edited the Main.java file and when compiling I got this: :( :o
||=== Build: Debug in Life_GDP (compiler: GNU GCC Compiler) ===|
||warning: C:\Users\gerardo\Programming\LearningSwingJava\Life_GDP\Main.java: linker input file unused because linking not done|
obj\Debug\Main.o||No such file or directory|
||error: no input files|
||=== Build failed: 2 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
Any suggestion?
Thanks,
Gerardo
-
I got the same error because my GCC Compiler does not support compiling Java files.
I was surprised that Code::Blocks does anything other than being a Text Editor for Java files.
Do you have reason to believe it can compile Java files when using an Compiler that works with Java files?
Tim S.
-
Do you have reason to believe it can compile Java files when using an Compiler that works with Java files?
We only support Java files in projects, not compilation explicitly. The reason is quite simple: Often you have c-libs (f)or JNI (https://en.wikipedia.org/wiki/Java_Native_Interface) for low-level function in Java projects. By supporting Java files and syntax high-lighting you can search for code-snippets you may need when actually working on a support C-project. I find this very useful and use it quite often.
But sure: You should not try to compile a Java project. I set the target style to "commands only" in that case so the respective target is just skipped during compilation.
-
...btw: on the frontpage of Code::Blocks (https://www.codeblocks.org/) one of the first paragraphs is:
The free C/C++ and Fortran IDE.
So I am not sure why people assume it could compile any other than that...