Thread: CodeBlocks doesn´t copiles software

  1. #1
    Registered User
    Join Date
    Jan 2016
    Posts
    10

    CodeBlocks doesn´t copiles software

    Hello guys, could help?

    I trying to compile application in Codeblock but I got some probelms.
    Attached Images Attached Images -porcaria-jpg -erro-2-code-jpg 

  2. #2
    Tweaking master Aslaville's Avatar
    Join Date
    Sep 2012
    Location
    Rogueport
    Posts
    528
    You might want to translate that error to english

  3. #3
    Guest
    Guest
    So the compilation fails, or just main.exe as you try to run it?

  4. #4
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    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?

  5. #5
    Registered User
    Join Date
    Jan 2016
    Posts
    10
    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
    Attached Images Attached Images -hello-world-jpg -hello-world-2-jpg -hello-world3-jpg 

  6. #6
    Registered User
    Join Date
    Jan 2016
    Posts
    10
    This video shows compilation from CodeBlocks without error.I tried the same code. I have no idea which problem CodeBlock had to compile application
    Attached Images Attached Images -hello-world-3-jpg -hello-world-4-jpg 

  7. #7
    Guest
    Guest
    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.

  8. #8
    Registered User
    Join Date
    Jan 2016
    Posts
    10
    No , I don´t
    It´s possible to compile from the command line in Windows 8?

  9. #9
    Guest
    Guest
    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.

  10. #10
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    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

  11. #11
    Registered User
    Join Date
    Jan 2016
    Posts
    10
    Quote Originally Posted by Guest View Post
    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.


    @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.

    -hello-world-7-jpg-hello-world-8-jpg-hello-world-7-jpg-hello-world-8-jpg

  12. #12
    Registered User
    Join Date
    Jan 2016
    Posts
    10
    the problem´s are in Windows or CodeBlocks

  13. #13
    Registered User
    Join Date
    Jan 2016
    Posts
    10
    I translate

  14. #14
    Registered User Arhaikos's Avatar
    Join Date
    Jan 2016
    Location
    Greece
    Posts
    14
    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

  15. #15
    Guest
    Guest
    Quote Originally Posted by maquinamaluca View Post
    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.
    So you ran Main.exe from the CMD, yes? Like so:
    Code:
    C:\Users\Ayrtun...\primiero projeto>Main.exe
    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:
    -dialog-properties-generaltab-penguins-win8-png


    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 02-02-2013, 05:33 AM
  2. using codeblocks
    By torquemada in forum Tech Board
    Replies: 7
    Last Post: 04-20-2011, 08:57 PM
  3. Replies: 1
    Last Post: 12-07-2010, 06:53 AM
  4. Codeblocks.
    By Kitt3n in forum C++ Programming
    Replies: 5
    Last Post: 05-16-2010, 01:50 PM
  5. Copiles but doesnt run....
    By Musicdip in forum C++ Programming
    Replies: 10
    Last Post: 06-21-2002, 06:05 PM