Author Topic: Can´t build and run because the project has not been built ???  (Read 11108 times)

Offline pel

  • Multiple posting newcomer
  • *
  • Posts: 16
Can´t build and run because the project has not been built ???
« on: December 21, 2007, 05:01:47 pm »
Hello,

I am using the Nightly Build from 16 december 2007

thats my code:

Code
#include <stdio.h>


int main(int argc, char* argv[])
{

}

I am clicking the F9 key for "Build and Run" and after that i get always this message: 

I can press "Ja" = "yes" about 1000 times nothing changes the popup window does not disappear ?? Is this a bug?

Offline pel

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Can´t build and run because the project has not been built ???
« Reply #1 on: December 21, 2007, 05:49:52 pm »
another project with i tried:



I tried to build my .C file into an .exe file but it failed, why? yesterday all worked fine... :-(

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Can´t build and run because the project has not been built ???
« Reply #2 on: December 21, 2007, 08:39:59 pm »
yesterday all worked fine... :-(
Good old times... ;-)
But seriously: C::B is telling you that it cannot find the compiler executable(s). Thus check the compiler setup and verify that you didn't rename the MinGW folder or something. In addition: Do you really mean "*.C" files? Because that could lead into trouble under Linux. It is not common to use *.C for c-files IMHO. You better choose lower case.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline pel

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Can´t build and run because the project has not been built ???
« Reply #3 on: December 21, 2007, 09:09:10 pm »
yesterday all worked fine... :-(
Good old times... ;-)
But seriously: C::B is telling you that it cannot find the compiler executable(s). Thus check the compiler setup and verify that you didn't rename the MinGW folder or something. In addition: Do you really mean "*.C" files? Because that could lead into trouble under Linux. It is not common to use *.C for c-files IMHO. You better choose lower case.
With regards, Morten.
sorry about .C it was a typo i mean i use of course .c ! about the compiler look that image please:

actually my path to the compiler is ok!?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Can´t build and run because the project has not been built ???
« Reply #4 on: December 21, 2007, 09:44:57 pm »
actually my path to the compiler is ok!?
Try using C:\MinGW only (and notice the red information on your screen shot about that).
And BTW: Are you aware that you installed just the GCC core package? C++ (mingw32-g++) is missing (btw).
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline pel

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Can´t build and run because the project has not been built ???
« Reply #5 on: December 22, 2007, 11:53:51 am »
actually my path to the compiler is ok!?
Try using C:\MinGW only (and notice the red information on your screen shot about that).
And BTW: Are you aware that you installed just the GCC core package? C++ (mingw32-g++) is missing (btw).
With regards, Morten.
I used c:\mingw only now but its not logical and furthermore its not working ;-) i have installed mingw 5.1.3 i think is there anything more complete or newer ? you have a direct link ?

mingw32-g++.exe <-- although i wanna compile only C programms not c++ still i would like to know where i find this file --> mingw32-g++.exe

about this error: Execution of 'mingw32-g++.exe  -o bin\Debug\Zugverwaltung.exe obj\Debug\Zugaufgabe.o' in 'D:\ADV-Programmier-Projekte\Zugverwaltung' failed.
why is codeblocks IDE using the mingw32-g++.exe which does not exist on my pc ??? this file codeblocks should use: mingw32-gcc.exe !!!

and why is codeblcoks using the Zugaufgabe.o file and not the Zugaufgabe.c file ????

I think the problem codeblocks IDE having is that i dont have the mingw32-g++.exe on my pc but its set in the compiler settings which leads to that error.

I have just read this on the wiki of codeblocks: MinGW must be located on the same partition as the files you want to compile - MinGW is on my partition C:\ but my files which must be compiled are on D:\project folder etc... so is this bad?

« Last Edit: December 22, 2007, 12:01:11 pm by pel »

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
Re: Can´t build and run because the project has not been built ???
« Reply #6 on: December 22, 2007, 12:40:14 pm »
why is codeblocks IDE using the mingw32-g++.exe which does not exist on my pc ??? this file codeblocks should use: mingw32-gcc.exe !!!
Try this: right click the file in filemanager, and choose properties. In advanced you see compilor variable. It shoud be CPP for a c++ file and CC for a c file.

and why is codeblcoks using the Zugaufgabe.o file and not the Zugaufgabe.c file ????

In the compile fase of the proces it compiles the .c file and builds the .o file.
In the link fase it uses the .o files to build the executable.

Offline pel

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Can´t build and run because the project has not been built ???
« Reply #7 on: December 22, 2007, 04:06:29 pm »
why is codeblocks IDE using the mingw32-g++.exe which does not exist on my pc ??? this file codeblocks should use: mingw32-gcc.exe !!!
Try this: right click the file in filemanager, and choose properties. In advanced you see compilor variable. It shoud be CPP for a c++ file and CC for a c file.

and why is codeblcoks using the Zugaufgabe.o file and not the Zugaufgabe.c file ????

In the compile fase of the proces it compiles the .c file and builds the .o file.
In the link fase it uses the .o files to build the executable.

regarding that image everything seems fine so what?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Can´t build and run because the project has not been built ???
« Reply #8 on: December 22, 2007, 04:48:03 pm »
In "Toolchain Executables" you can use "mingw32-gcc.exe" as "Linker for dynamic libs:".
But if you do so you cannot link c++ programs.
The better way is to install "mingw32-g++.exe".
If you use the mingw-installer (what is recommended by mingw.org for MinGW-5.1.3) you can easily install the g++-suite.

Nevertheless C::B is compiled with the gcc 4.2.1-dw2 version of theMinGW-compiler-suite, MinGW5.1.3 uses gcc-3.4.5 afaik.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Can´t build and run because the project has not been built ???
« Reply #9 on: December 22, 2007, 04:56:33 pm »
If you insist on *not* to install the G++ compiler (that's fine if you plan to develop C only) then simply change the linker executable to mingw32-gcc.exe, too and your problem should be solved.

Edit: Ooops. Jens and my post have crossed. Jens was a bit earlier (:cry:) but basically he tells you the same.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline pel

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Can´t build and run because the project has not been built ???
« Reply #10 on: December 22, 2007, 05:09:44 pm »
then simply change the linker executable to mingw32-gcc.exe, too and your problem
jesus it works!!!  :lol: :lol: thank you folks thats a big xmas gift now ;-)