Code::Blocks

User forums => Using Code::Blocks => Topic started by: Skipt on August 05, 2013, 03:08:18 am

Title: Won't let me build?
Post by: Skipt on August 05, 2013, 03:08:18 am
I recently installed CB. I made a new project and just tried running hello world that they set out for you. It keeps asking "It seems this project has not been built yet. Do you want to build it now?"

I keep clicking yes, and it just keeps popping up. It says it's looking for (file name is Test) Test.exe in one of the folders, but I check in there and there is no exe file in there.

"Checking for existence: C:\Users\ericreese20\Desktop\Test\bin\Debug\Test.exe"

Any ideas as to what is going on and how I can fix this?
Title: Re: Won't let me build?
Post by: stahta01 on August 05, 2013, 05:07:36 am
Read the FAQs
http://wiki.codeblocks.org/index.php?title=FAQ (http://wiki.codeblocks.org/index.php?title=FAQ)

Important ones to read include but not limited to
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F)
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_My_build_fails_in_the_compile.2Flink.2Frun_step_with_a_Permission_denied_error.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_My_build_fails_in_the_compile.2Flink.2Frun_step_with_a_Permission_denied_error.3F)

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 05, 2013, 05:29:26 am
I read it but didn't see anything that would help?
Title: Re: Won't let me build?
Post by: BlueHazzard on August 05, 2013, 08:00:12 pm
how about
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
???
we can't help without info...
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 02:11:52 am
The Build log is this

Checking for existence: C:\Users\ericreese20\Desktop\lkjk\bin\Debug\lkjk.exe

I go into that folder and there is no lkjk.exe file. I will hit build and run and it will ask if i want to build it since it hasnt bene built yet, i hit yes, and it keeps asking the same question until i hit no or cancel.
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 02:30:28 am
BlueHazzard: I suggest reading this link, http://slash7.com/2006/12/22/vampires/ (http://slash7.com/2006/12/22/vampires/)

Tim S.
PS: I am done in this thread, I see no way to help this person.
Title: Re: Won't let me build?
Post by: BlueHazzard on August 08, 2013, 12:08:25 pm
@stahta01: thx...

@Skipt: if you can't read, and follow easy steps to provide information, i can't help

I'm out...
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 04:26:33 pm
I am running Code::Blocks version (Where do I find version number? On the website all it states is that it is the binary version. It is the latest version on the website) on Windows 8
(Home). The compiler I use is GNU GCC Compilerl
version  (I don't know how to find my compiler version. I'd assume it is the latest version since I downloaded a few days ago)



Description of problem.
I posted in previous post. Won't let me build, keeps asking if I want to build.

Build log:
I posted it in previous post.

Crash report:
 Code blocks did not crash

]
I have already tried ...
Like four different IDE's and re-installing, and windows compatibility mode, etc. Tried googling
... but none of them worked.
Title: Re: Won't let me build?
Post by: oBFusCATed on August 08, 2013, 04:37:06 pm
Where do I find version number
Help->About?

GCC version  (I don't know how to find my compiler version. I'd assume it is the latest version since I downloaded a few days ago)
Run gcc --version in a terminal/console. You have to cd to the place where GCC is installed.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 04:49:34 pm
12.11 version rev 8629

Still working on finding compiler lol.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 04:52:55 pm
When you say terminal/console, do you mean command prompt? Also, what does "cd" mean
Title: Re: Won't let me build?
Post by: oBFusCATed on August 08, 2013, 04:54:39 pm
When you say terminal/console, do you mean command prompt?
Of course.

Also, what does "cd" mean
That you need a tutorial explaining the basics how to use terminal/console/command prompt. :)
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 05:21:29 pm
Thanks, learning a lot with command prompt. Where is it installed for you guys? I'm not even sure where I can find it. I'm usually a web developer type, not a programmer. Right now I have my dir in console as C: MinGW > libexec > gcc > mingw32 >4.6.2

then i typed "gcc --version" and came up with error as it is not a recognizable internal or external command, so I know i'm not doing something right
Title: Re: Won't let me build?
Post by: oBFusCATed on August 08, 2013, 05:39:19 pm
It may be at a lot of places. Search for gcc.exe or g++.exe.
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 05:39:36 pm
Thanks, learning a lot with command prompt. Where is it installed for you guys? I'm not even sure where I can find it. I'm usually a web developer type, not a programmer. Right now I have my dir in console as C: MinGW > libexec > gcc > mingw32 >4.6.2

then i typed "gcc --version" and came up with error as it is not a recognizable internal or external command, so I know i'm not doing something right

http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Compiler-neutral_setup_steps (http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Compiler-neutral_setup_steps)
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 05:40:40 pm
Using MinGW GCC in Code::Blocks (CB) under Windows problems types:
   1. Toolchain configuration issues
   http://forums.codeblocks.org/index.php/topic,18075.0.html (http://forums.codeblocks.org/index.php/topic,18075.0.html)
   2. Compiler Installation issues
      a. Compiler not installed
      b. Compiler only partly installed
      c. Compiler installation damaged
   3. Compiler Conflict issues
      a. Cygwin in the system path
      b. MSys in the system path
      c. Special folder exists on your computer.
          x:\Mingw is a special folder for some Mingw GCC installs for any drive letter in place of "x"
   4. CB project settings issues
      a. Project/target is not using the correct Compiler
      b. Project is using more than one Compiler
   5. Security related issues
      a. Windows security
      b. Anti-Virus caused issues
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 05:43:12 pm
If you really want help post a real full compiler re-build log.

NOTE: Build and Re-Build are two different things!

So, post a full compiler build log after doing a re-build or a clean/build!

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 06:27:12 pm
Found it! It was in the /bin/ folder

Says

gcc (GCC) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 06:29:22 pm
If you really want help post a real full compiler re-build log.

NOTE: Build and Re-Build are two different things!

So, post a full compiler build log after doing a re-build or a clean/build!

Tim S.

Okay, here is the build log when I do rebuld

Code: [Select]
-------------- Clean: Debug in lkjk (compiler: GNU GCC Compiler)---------------

Cleaned "lkjk - Debug"

-------------- Build: Debug in lkjk (compiler: GNU GCC Compiler)---------------

mingw32-gcc.exe -Wall  -g     -c C:\Users\ericreese20\Desktop\lkjk\main.c -o obj\Debug\main.o
mingw32-g++.exe  -o bin\Debug\lkjk.exe obj\Debug\main.o   
Execution of 'mingw32-g++.exe  -o bin\Debug\lkjk.exe obj\Debug\main.o' in 'C:\Users\ericreese20\Desktop\lkjk' failed.
Nothing to be done (all items are up-to-date).
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 06:35:40 pm
I suggest turning off Windows Security (and any antivirus software) or building somewhere safe.
Building on the desktop might NOT be safe/permitted in Windows 8.

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 06:37:55 pm
This is a laptop. I also don't use antivirus software or firewalls lol. I only use this for school. It's a pretty basic dell computer
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 06:44:44 pm
This is a laptop. I also don't use antivirus software or firewalls lol. I only use this for school. It's a pretty basic dell computer

So, you are NOT running windows security???
It is ON by default in every version of windows I have ever used, since Vista!!

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 06:49:26 pm
Nope, I turned it off. I don't like it
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 07:03:09 pm
From an cmd.exe prompt do this

Replace CBTOOLCHAINPATH with the Compiler path you are using.

Code: [Select]
SET PATH=CBTOOLCHAINPATH\bin;%PATH%

cd /d C:\Users\ericreese20\Desktop\lkjk
mingw32-gcc.exe -Wall  -g     -c C:\Users\ericreese20\Desktop\lkjk\main.c -o obj\Debug\main.o
mingw32-g++.exe  -o bin\Debug\lkjk.exe obj\Debug\main.o

Then confirm the exe exists in bin\Debug\lkjk.exe.

Then try running it.

Did it exist?
Did it run?

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 07:39:01 pm
I'm a bit confused. I go to the directory you tell me to in the code brackets. Am I typing that entire 2nd line in one command in cmd? Cuz I'm getting the error of it not being a recognizable internal/external command
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 08:02:16 pm
I'm a bit confused. I go to the directory you tell me to in the code brackets. Am I typing that entire 2nd line in one command in cmd? Cuz I'm getting the error of it not being a recognizable internal/external command


I am NOT understanding your issue; do you understand what is a command prompt is?

If yes, I think you need to learn what the "cd" command is before anyone can help you.

I NEVER told you to browse to any folder.

If you want more help tell me what you really did!!!

Edit: What is your Compiler Installation folder you used in place of CBTOOLCHAINPATH?

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 08:12:56 pm
Ok..I start up command prompt. This is what I type line by line

SET PATH=C:\MinGW\bin;%PATH%
cd /d C:\Users\ericreese20\Desktop\lkjk 
(I copy and paste this) mingw32-gcc.exe -Wall  -g     -c C:\Users\ericreese20\Desktop\lkjk\main.c -o obj\Debug\main.o
(so far everything is fine)
(now I type this line and I get an error)
mingw32-g++.exe  -o bin\Debug\lkjk.exe obj\Debug\main.o
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 08:13:38 pm
The error is the standard "doesnt recognize it as an internal or external command"
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 08:19:19 pm
The error is the standard "doesnt recognize it as an internal or external command"

This means you have a bad MinGW installation! Missing c++ compiler exe.

Confirm by trying to find "mingw32-g++.exe" in the folder "C:\MinGW\bin"

Not a CB issue.

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 08:35:08 pm
You are correct, there is no g++ file. So what do I do? Would uninstalling and re-downloading it fix this issue?
Title: Re: Won't let me build?
Post by: stahta01 on August 08, 2013, 08:39:47 pm
You are correct, there is no g++ file. So what do I do? Would uninstalling and re-downloading it fix this issue?

Me, I would uninstall the MinGW in that folder. And then, setup CB to use a different MinGW this might require installing another MinGW installation.

NOTE: CB did NOT install MinGW in that folder!
So, uninstalling and re-installing CB will NOT fix the problem!!!!!

Tim S.
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 09:16:42 pm
So I uninstalled mingw and downloaded the file from this link (This is only thing I downloaded)

http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.7.2-1/

Ran a new project, I clicked ReBuild, and this comes up at the bottom, which is new

(http://i40.tinypic.com/aa7jls.png)

When I click over to Build Log it displays this

(http://i39.tinypic.com/e1cglx.png)
Title: Re: Won't let me build?
Post by: BlueHazzard on August 08, 2013, 09:43:22 pm
your compiler installation is a mess...

i would recommend you to uninstall all:
mingw
codeblocks

then search for "mingw" and delete all folders with this name (especially the folder c:\Mingw)

delete the MingW entry of your PATH environment variable:
http://www.7tutorials.com/simple-questions-what-are-environment-variables
and
http://www.7tutorials.com/how-edit-or-delete-environment-variables-windows-7-windows-8
!!! Warning !!! only edit the PATH variable, dont delete it. Push the "edit" button, search for the part with the Mingw path and delete the part between the two ";"

then download http://sourceforge.net/projects/codeblocks/files/Binaries/12.11/Windows/codeblocks-12.11mingw-setup.exe/download
and install it...
this c::b installer comes with a mingw installation...

greetings

Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 09:57:13 pm
I uninstalled and deleted everything. THen I did the environment thing. This is what came up, I don't see a MinGW entry or anything like that so I assume it's fine. Here is a pic in case you wanted to see
(http://i39.tinypic.com/33p97xl.png)

Currently working on the download of C:B. 95.9 MB. I'm at 4 so far lol
Title: Re: Won't let me build?
Post by: Skipt on August 08, 2013, 10:22:35 pm
I installed it and there was a little popup in the bottom right corner of the program which read "Can't find compiler executable for GNU GCC Compiler" or something like that. I haven't figured out how to get the popups/error messages to display.

I just did a rebuild now, after seeing that message. This is the build log

Code: [Select]
"lkjk - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?!
Goto "Settings->Compiler and debugger...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).

I'm leaving now to go to the store, but I assume I just need to fix the path like it says? When I go to settings, there is no "Compiler and debugger" option. There is only "Compiler" and "Debugger", two seperate entities.

Screw it, I didn't wanna waste time. Ok so I went to where it said, and it had installation path at C:/MinGW, so I changed it to code blocks > MinGW and it worked! I got a rebuild successful, then I did buld and run and got hello world!

Thanks a lot everyone, it seems like it is working. You all are very patient with me. I can't thank you enough
Title: Re: Won't let me build?
Post by: BlueHazzard on August 08, 2013, 10:31:13 pm
I installed it and there was a little popup in the bottom right corner of the program which read "Can't find compiler executable for GNU GCC Compiler" or something like that. I haven't figured out how to get the popups/error messages to display.

I just did a rebuild now, after seeing that message. This is the build log

Code: [Select]
"lkjk - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?!
Goto "Settings->Compiler and debugger...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).


this is because you have the path to the old Mingw installation in your PATH environment variable.

I uninstalled and deleted everything. THen I did the environment thing. This is what came up, I don't see a MinGW entry or anything like that so I assume it's fine.

No this was wrong: you have to mask the Path in the "System variables" window and hit "edit" then a window pops up and there you have to search for the first Mingw path and delete it (but this was described in the links, so i want go into detail)

greetings
Title: Re: Won't let me build?
Post by: Skipt on August 09, 2013, 03:21:21 am
I installed it and there was a little popup in the bottom right corner of the program which read "Can't find compiler executable for GNU GCC Compiler" or something like that. I haven't figured out how to get the popups/error messages to display.

I just did a rebuild now, after seeing that message. This is the build log

Code: [Select]
"lkjk - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?!
Goto "Settings->Compiler and debugger...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).


this is because you have the path to the old Mingw installation in your PATH environment variable.

I uninstalled and deleted everything. THen I did the environment thing. This is what came up, I don't see a MinGW entry or anything like that so I assume it's fine.

No this was wrong: you have to mask the Path in the "System variables" window and hit "edit" then a window pops up and there you have to search for the first Mingw path and delete it (but this was described in the links, so i want go into detail)

greetings


Either way, I got it working with their help