Author Topic: Code Blocks doesn't compile or run anything for me anymore...  (Read 60810 times)

Offline Zamp

  • Multiple posting newcomer
  • *
  • Posts: 26
Code Blocks doesn't compile or run anything for me anymore...
« on: September 22, 2007, 03:03:30 am »
Up until today, Code Blocks worked just fine when I was making SDL programs, but now I have homework and need to make a console application, but it doesn't work.

I just started up Code Blocks, clicked create new project and picked a console application, then tried to run the default program it gives you, but it gives me an error:

"picture - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.



It does that for everything, even some projects that I had working before. I thought maybe something was wrong with the version I had, so I downloaded the newest one( the September 15 Build ) and it still does that. The only thing I did with my computer between now and when it used to work was delete some programs and run a disk defrag. Could that be why it isn't working anymore? If it is, what can I do to fix it?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #1 on: September 22, 2007, 03:11:35 am »
Verify that your compiler is installed.

What is the path of your compiler?
What path does C::B has set for your compiler?
What compiler is set for your project?

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Zamp

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #2 on: September 22, 2007, 04:18:44 am »
I'm not really sure where my compiler is. Does Code Blocks come with one? All I did was download C::B and put it in a folder on the desktop. The compiler I'm trying to use is GNU GCC Compiler.

Now that I think about this more, when I uninstalled some programs earlier I uninstalled Dev C++. Was C::B using Dev C++'s compiler, and now that it's gone it doesn't have one? If thats it, how can I fix this without reinstalling Dev C++? I tried changing the compiler, but it still gives me the same error, so yeah... >__<

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #3 on: September 22, 2007, 04:22:44 am »
Download MinGW-5.1.3 "Automated MinGW Installer"

http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780&release_id=529741

Run the installer, Remember to pick the Candidate version for MinGW GCC 3.4.5.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Zamp

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #4 on: September 22, 2007, 04:57:10 am »
I installed it and picked the Candidate version, but it still isn't working. >_< After it got installed it created a bunch of files on my desktop, and post of them are .tar.gz files. Am I supposed to extract those and put them somewhere? >_>

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #5 on: September 22, 2007, 10:44:54 am »
Look at Settings -> Compiler and Debugger settings -> Global Compiler Settings -> Toolchain executables
Is the Compiler's installation directory set correctly (try autodetect or set it manually),
are the name's of the executables correctly (check them all)

Offline Zamp

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #6 on: September 22, 2007, 09:50:44 pm »
I just went into the settings and changed where the compiler was found, and that did something, but now when I try to Build and Run it, a box comes up and says that the project hasn't been built, would you like to do that? I click yes but the same box just keeps popping up until I click no.

When I click no, it says this in the box at the bottom:

Checking for existence: C:\Documents and Settings\Zak\Desktop\Code Blocks\picture\bin\Debug\picture.exe
Executing: "C:\Documents and Settings\Zak\Desktop\Code Blocks\picture\bin\Debug\picture.exe"  (in C:\Documents and Settings\Zak\Desktop\Code Blocks\picture\.)
Execution of '"C:\Documents and Settings\Zak\Desktop\Code Blocks\picture\bin\Debug\picture.exe" ' in 'C:\Documents and Settings\Zak\Desktop\Code Blocks\picture' failed.
Nothing to be done.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #7 on: September 22, 2007, 10:15:38 pm »
Right-Click on your project in the Manager and check Properties -> Build targets -> Output filename.
If you compile under Windows and the .exe is missing from the filename, codeblocks cannot start the program, because its real filename (on HD) ends with .exe, and the build target could not be found.

Offline Zamp

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Code Blocks doesn't compile or run anything for me anymore...
« Reply #8 on: September 23, 2007, 03:35:53 pm »
Thanks for your help everyone. My computer just got accidently reformatted, so I had to redownload Code Blocks, and now it is working fine.

Also, since I don't feel like making a new topic I'll just ask here, where can I download Code Blocks for openSUSE linux? In pretty much all of the nightly builds it says it isn't uploaded yet. =/

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org