Author Topic: Install seems successful, but cannot invoke the compiler  (Read 2486 times)

Offline turtle

  • Single posting newcomer
  • *
  • Posts: 2
Install seems successful, but cannot invoke the compiler
« on: August 31, 2015, 03:22:41 pm »
I am running Code::Blocks version 13.12 on Windows 7 x64 Ultimate Service Pack 1 (6 Gb of memory).

The compiler I use is MinGW version # unknown.    Today,  8/30/15,  I downloaded and installed codeblocks-13.12mingw-setup.exe   of   27 Dec 2013.

Steps to reproduce problem.
a. I open a .txt file (containing C code) in CodeBlocks.  No problem. 
b. I run the "build" process and get the message:  Nothing to be done (all items are up-to-date).
c. I attempt the "run" process and two things happen.
   The first thing is I get a popup window which says it seems this file has not been built yet.  Do you want to build it now?
            Clicking on "yes" causes popup to go away and then come back.  Popup appears to disregard click on "yes".
            Clicking on "no" causes the following to appear on my screen:   A small window which looks like a console window, mostly black in color.
            Clicking on "cancel" causes the popup to go away.

I could not find any "Build log tab", hence I have no log to report.

CodeBlocks did not crash.

I have already tried modifying global compiler settings to:    c:\Program Files (x86)\CodeBlocks\MinGW\bin

   I believe this is the free compiler distributed with Code::Blocks.

In an attempt to resolve this problem I have looked at FAQ link on CodeBlocks website.  I did not recognize any help from this resource.

I have tried looking at all documentation provided with CodeBlocks to see if I needed to take any steps after installing CodeBlocks to assist in making it functional.

I checked out the "tips" startup feature to see if any install help was buried in there.
 
After  looking at CodeBlocks manual on its website I  set the environment variables as  follows:
   MYPATH= c:\Program Files (x86)\CodeBlocks\MinGW\bin
   PATH=$(MYPATH)

Then running the "build" process I get:  Nothing to be done (all items are up-to-date).

Then executing the "run" process I am now in what seems to be a loop process since I am back to the  popup window described above.

I notice that there is a space in the pathname (Program Files) specifying the install location for MinGW.  I wonder if this is OK, but it is how the installer installed Code::Blocks, so I don't really think this should be a problem.

I am so ignorant of all the processes involved.  My goal is simply to develop apps for me to run on my desktop PC.    Thanks in advance for any pointers that can be provided.




Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Install seems successful, but cannot invoke the compiler
« Reply #1 on: September 01, 2015, 12:49:57 am »

have you tried to use projects?
C::B uses the file extension to distinguish between c and c++ files, so compiling a simple txt file won't work, because c::b don't know if you are using c or c++ and so it can't call the right compiler...

Not only for the topic owner, but for every c::b and programming beginner:
c::b is made to use PROJECTS. specially if you  are a noob with the build process: USE PROJECTS!!! It will simplify your life...


[EDIT:]
To use projects: File->New->Project


Offline papagym

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: Install seems successful, but cannot invoke the compiler
« Reply #2 on: September 01, 2015, 07:59:51 pm »
It sounds like you may not have saved your program correctly, but I may be wrong.  I think you have to give your program a name with a .c extension. If your using C. Like xyz.c when you build it.  To do a build you need to use the icon that looks like a gear.

The build log tab is located just below the editor there are a lot of different tabs there look under Logs & Others.

« Last Edit: September 01, 2015, 08:13:04 pm by papagym »