Author Topic: Old Problem but no solutions  (Read 6111 times)

Offline labdabeta

  • Single posting newcomer
  • *
  • Posts: 3
Old Problem but no solutions
« on: June 09, 2011, 07:03:52 pm »
I am having a major problem with code::blocks that is fairly well posted on these forums but I have tried all of the solutions and none of them worked. When I press Build and Run I repeatedly get the popup saying "It seems this project has not been built yet. Do you want to build it now?" (if I press Yes is pops up again) when I just hit build I get this message in the build log "-------------- Build: Debug in TESTINGOPENGL ---------------

mingw32-g++.exe -Wall  -g    -I"C:\Program Files\CodeBlocks\MinGW\include"  -c D:\Programming\C++\TESTINGOPENGL\main.cpp -o obj\Debug\main.o
Execution of 'mingw32-g++.exe -Wall  -g    -I"C:\Program Files\CodeBlocks\MinGW\include"  -c D:\Programming\C++\TESTINGOPENGL\main.cpp -o obj\Debug\main.o' in 'D:\Programming\C++\TESTINGOPENGL' failed.
Nothing to be done."

As I said I have done everything I can think of. Why won't any of my projects build?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Old Problem but no solutions
« Reply #1 on: June 09, 2011, 07:34:58 pm »
Execution of 'mingw32-g++.exe -Wall  -g    -I"C:\Program Files\CodeBlocks\MinGW\include"  -c D:\Programming\C++\TESTINGOPENGL\main.cpp -o obj\Debug\main.o' in 'D:\Programming\C++\TESTINGOPENGL' failed.
Nothing to be done."
What happens if you open a command shell, go into the directory "D:\Programming\C++\TESTINGOPENGL" and then enter (exactly like that):
"C:\Program Files\CodeBlocks\MinGW\bin\mingw32-g++.exe" -Wall  -g    -I"C:\Program Files\CodeBlocks\MinGW\include"  -c D:\Programming\C++\TESTINGOPENGL\main.cpp -o obj\Debug\main.o
???
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 stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Old Problem but no solutions
« Reply #2 on: June 09, 2011, 08:12:06 pm »
Before Morten command you might need to set the path to find MinGW GCC by doing the following in the command shell.
Tim S.

Code
SET PATH=C:\Program Files\CodeBlocks\MinGW\bin;%PATH%

How to go to "D:\Programming\C++\TESTINGOPENGL"

Code
cd /D D:\Programming\C++\TESTINGOPENGL
« Last Edit: June 09, 2011, 08:14:05 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

Offline labdabeta

  • Single posting newcomer
  • *
  • Posts: 3
Re: Old Problem but no solutions
« Reply #3 on: June 09, 2011, 08:31:09 pm »
That was a step in the right direction, it gave me a few syntax errors... but I would like to be able to run this from C::B. Do I have to make some kind of batch file?
maybe:
@echo off
cd /d %1
@echo on
"C:\Program Files\CodeBlocks\MinGW\bin\mingw32-g++.exe" -Wall  -g    -I"C:\Program Files\CodeBlocks\MinGW\include"  -c %2 -o obj\Debug\main.o
???

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Old Problem but no solutions
« Reply #4 on: June 09, 2011, 08:34:42 pm »
That was a step in the right direction, it gave me a few syntax errors... but I would like to be able to run this from C::B. Do I have to make some kind of batch file?
No. That means that either:
- the compiler your are using in your project/target directory is not setup correctly
...or:
- you do not point to C:\Program Files\CodeBlocks\MinGW for the tool chain executables (e.g. you point to C:\Program Files\CodeBlocks\MinGW\bin, which is wrong).
« Last Edit: June 09, 2011, 09:46:48 pm by MortenMacFly »
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Old Problem but no solutions
« Reply #5 on: June 09, 2011, 08:35:43 pm »
Before Morten command you might need to set the path to find MinGW GCC by doing the following in the command shell.
Tim S.

Code
SET PATH=C:\Program Files\CodeBlocks\MinGW\bin;%PATH%
Sorry, but that is not right, and would spoil what I have in mind. Please don't do that, just do the one command line I said in a plain new command shell.
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 labdabeta

  • Single posting newcomer
  • *
  • Posts: 3
Re: Old Problem but no solutions
« Reply #6 on: June 09, 2011, 08:39:46 pm »
Thank you! for some reason the toolchain executable was located at a different MinGW file that was not working.

Frederick

  • Guest
Re: Old Problem but no solutions
« Reply #7 on: June 23, 2011, 12:11:48 am »
I am having exactly the same problem in Mac OS X 10.6.7.

I installed CodeBlocks 10.05-p1-mac in Development/Applications as instructed. It detects the GNU GCC compiler, I make a new Frame (or Dialog) project from wxWidgets 2.8x using wxSmith, select the default values, and try to run it. It does the same loop as above, continuing to ask to be compiled.

Can someone point me to an OS X solution?

Frederick