User forums > Using Code::Blocks
Help with compiling errors
stahta01:
--- Quote from: stahta01 on July 13, 2014, 10:43:14 pm ---Posting a build log might help; till you post one we will not know.
I suggest posting the normal info.
Like CB Version, OS Name, Compiler name and version.
Tim S.
--- End quote ---
Post a build log or I will report you as a Troll!!!
Tim S.
GingerDolphin:
Alright, gosh.
OS: Windows Vista Home Basic, 32 bit.
Code::Blocks version: 13.12
compiler name: Well, it's the default, GNU GCC/MingW, version 4.7.1
program I was trying to run (in case you can find something wrong with the code itself):
-----------------------------
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
-----------------------------
complete build log(as shown in build log tab at bottom of the window)
-------------- Build: Debug in Hassentopia (compiler: GNU GCC Compiler)---------------
mingw32-c++.exe -Wall -fexceptions -g -ID:\ProjectH\Hassentopia\bin -ID:\ProjectH\Hassentopia\obj -c D:\ProjectH\Hassentopia\files\main.cpp -o obj\Debug\main.o
Execution of 'mingw32-c++.exe -Wall -fexceptions -g -ID:\ProjectH\Hassentopia\bin -ID:\ProjectH\Hassentopia\obj -c D:\ProjectH\Hassentopia\files\main.cpp -o obj\Debug\main.o' in 'D:\ProjectH\Hassentopia\files' failed.
sorry for coming off as fake to you, I'm just trying to do what you tell me to do.
stahta01:
Why is CB trying to run "mingw32-c++.exe" instead of the normal "mingw32-g++.exe"?
Do you know?
Edit2: Looks like you did change the settings; but, the c++.exe should work.
Did you change the toolchain setting?
What are the toolchain settings?
Where is the compiler installed? What path to it?
What does CB has as the path to the compiler?
Edit1:
Why is these options added "-ID:\ProjectH\Hassentopia\bin" and "-ID:\ProjectH\Hassentopia\obj"
Did you add random compiler search folders or what?
Edit3:
--- Quote ---Using MinGW GCC in Code::Blocks (CB) problems types:
1. Toolchain configuration issues
a. CB configuration is corrupted
b. CB Toolchain not configured correctly.
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.
i. X:\mingw (where X can be any drive letter)
ii. X:\mingw32 (where X can be any drive letter)
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
--- End quote ---
I suggest checking for "CB Toolchain not configured correctly." I posted directions for that in the past here.
http://forums.codeblocks.org/index.php/topic,18075.0.html
Tim S.
GingerDolphin:
Hahahaha... okay, sorry. So down there it's saying it's looking for the compiler in those folders? I was under the impression that's where the files it's trying to compile are(which IS where the files I want compiled are.) So, what did I do wrong?
Yes, the toolchain setting is changed like you said, but here is what it says anyway(under settings > compiler> global compiler settings > toolchaing executables, right?)
EDIT: everything was default, except for what you told me to change(the install location)
D:\Code_Blocks\MinGW
C compiler: mingw32-gcc.exe
C++ compiler: mingw32-c++.exe
linker for dynamic libs: mingw32-g++.exe
linker for static libs: ar.exe
debugger: GDB/CDB debugger : default
resource compiler: windres.exe
make program: mingw32-make.exe
stahta01:
Do you know how to open a cmd.exe window if yes do so.
Enter each line in the code box one at a time.
--- Code: ---cd /d D:\Code_Blocks\MinGW\bin
mingw32-c++.exe -v
--- End code ---
You should get something as a result what is the result?
Edit: When I mistype the command I got this as the result
--- Code: ---C:\Program Files\CodeBlocks_13_12\MinGW\bin>mingw32-cgg++.exe -v
'mingw32-cgg++.exe' is not recognized as an internal or external command,
operable program or batch file.
--- End code ---
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version