Hello guys, could help?
I trying to compile application in Codeblock but I got some probelms.
Hello guys, could help?
I trying to compile application in Codeblock but I got some probelms.
You might want to translate that error to english
So the compilation fails, or just main.exe as you try to run it?
Huh, the error looks like it's saying that it can't find the specified target. I'd check your codeblocks settings as this might be an IDE issue. Can you use a command line compiler and test if your code is compile-able yourself?
I tried to compile a simple Hello World program.I had compiled the code by the CodeBlocks but something fail to run code.I had reinstalled MinGw for 64 bits and also tried to compile Hello word program but it still fails. After I compile Hello World in CodeBlocks again with MinGgw 64 Bits show the same error.The CodeBlocks generates executable file but also fails to run oustide CodeBlocks. Maybe I using Windows 8 64 bits with CodeBlocks 32 Bits can disrupt the compilation?
I had unistalled CodeBlocks with RevoUnistaller and removed all registry of CodeBlocks. I tried to reinstall again e after install I got the same problem after compilation. I had Tried the CodeBlock without Compiler and a reinstalled compile in machine and setup CodeBlocks with MinGw for 64 Bits but shows the same problem. The CodeBlocks shows the same problem for each configuration from Compiler.I also tried to compile Dev C++ , Eclipse C/C++ and CodeLite and I got problems to compile application
This video shows compilation from CodeBlocks without error.I tried the same code. I have no idea which problem CodeBlock had to compile application
Do you know how to compile from the command line, e.g. gcc main.c -o Main.exe? Maybe this problem has nothing to do with CodeBlocks itself.
No , I don´t
It´s possible to compile from the command line in Windows 8?
Certainly. You just need to add the location of the compiler binary to your PATH variable, if it hasn't been set already.
Open a run window (WIN+R) and type in sysdm.cpl
Go to Advanced tab and click on Environment variables.
There edit the PATH variable, adding e.g. C:\MinGW\bin (separated by a ; like the rest) or whichever folder your gcc binary is located in.
Once you've done that, you can go to the folder where your main.c resides and SHIFT+RIGHTCLICK > Open command window here. Then just invoke gcc as in my example and then just type e.g. Main.exe to run your program.
It appears to me that in the first several posts you didn't create a project, you were just trying to compile the main.c file. In the last post you have a project file. I recommend you always create a project, don't just try to compile a single source file without the project.
Jim
@Guest
I followed your steps but I got the same message error .The message notificates "Windows can not access the device, path, or file. You may not have the appropriate permissions to access the item." I treid ro run as administrator but Windows notificates the message error again.I have tried to compile application still notificate the same message after run Hello world. Now CodeBlocks doesn´t notificate can´t find a compiler(...) after change setting path in Windows.
the problem´s are in Windows or CodeBlocks
I translate
Have you tried making a new project with the same code to see if that happens again?
Also is codeblocks compatibility available for your version of win8? I haven't really checked code::blocks requirements
So you ran Main.exe from the CMD, yes? Like so:
Does Main.exe have a file size, or is it 0 bytes? It should have a non-zero value, like 770KB for this image file:Code:C:\Users\Ayrtun...\primiero projeto>Main.exe
And definitely try creating a new project as other have suggested. In many IDEs, creating a new project sets up a Hello World! example which you can immediately build and run without any extra work. If that doesn't work, you might have a problem with Code Blocks or Windows. Since you seem to be compiling in your normal user directory, I can't think of why you'd have issues with permissions.