Author Topic: Won't let me build?  (Read 33204 times)

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Won't let me build?
« Reply #15 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
   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
« Last Edit: August 08, 2013, 05:53:00 pm by stahta01 »
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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Won't let me build?
« Reply #16 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.
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 Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #17 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

Offline Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #18 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
-------------- 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).

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Won't let me build?
« Reply #19 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.
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 Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #20 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Won't let me build?
« Reply #21 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.
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 Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #22 on: August 08, 2013, 06:49:26 pm »
Nope, I turned it off. I don't like it

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Won't let me build?
« Reply #23 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
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.
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 Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #24 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Won't let me build?
« Reply #25 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.
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 Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #26 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

Offline Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #27 on: August 08, 2013, 08:13:38 pm »
The error is the standard "doesnt recognize it as an internal or external command"

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Won't let me build?
« Reply #28 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.
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 Skipt

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: Won't let me build?
« Reply #29 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?