User forums > Using Code::Blocks

Help an idiot setup Codeblocks

(1/2) > >>

Rocketmagnet:
Hi all,
    I hope somebody can help me setup Codeblocks. I must be doing something wrong because I can't get it to compile.

This is what I have done so far:

Installed Codeblocks
Installed Mingw to D:\Compiler_Tools\mingw
Installed Visual C++ Compiler 2003 to D:\Program Files\Visual_2003
Added both of those directories to my PATH
In Codeblocks: set up the directories for where to find both
compilers' executables.
Created a new wxWidgets project.

When I tell it to compile, it says that it can't find the compiler executables, and that I should add the directories to my PATH.  But I have!

Is there an idiots guide to setting up this IDE?  I couldn't find anything like help or tutorials in Codeblocks itself.

Many thanks for any help

    Hugo Elias

mandrav:

--- Quote from: Rocketmagnet ---
In Codeblocks: set up the directories for where to find both
compilers' executables.

--- End quote ---

Do you mean that you have correctly setup the "Compiler's installation directory" in "Settings/Configure plugins/Compiler" under the "Programs" tab?

That's all that is needed. Not even needed to add them to the PATH environment variable.

Yiannis.

Rocketmagnet:
Aagh!

I still can't get it to work...  What am I doing wrong, and why can't it tell me something more useful than
"Can't find compiler executable in your search path. Most probably, you will not be able to compile anything..."

ok. I go to the Settings/Configure plugins/Compiler menu, Programs Tab:
    Compiler's Installation Directory  =  D:\Compilers\mingw\bin
    C Compiler  =  mingw32-gcc.exe
    C++ Compiler  =  mingw32-gcc.exe
    Linker  =  mingw32-g++.exe
 
This is *definately* the right directory, and these files *do* all exist.

If I can't get it working tonight I'm going to try another IDE, which is a real shame because I really like the look of Codeblocks :(

mandrav:

--- Quote from: Rocketmagnet ---Compiler's Installation Directory  =  D:\Compilers\mingw\bin
This is *definately* the right directory, and these files *do* all exist.
--- End quote ---


Your compiler's installation directory is not D:\Compilers\mingw\bin but D:\Compilers\mingw (note: no "bin")
This change should solve the problem.

Don't worry, you 'll get it working tonight!

Yiannis.

Rocketmagnet:
Many thanks Yiannis. You're right, that did get it working . . . almost!

Perhaps you could work your magic one more time.  When I create a console application, and try to compile it, I get the following messages:

Project   : Console application
Compiler  : MinGW Compiler Suite
Directory : D:\Data\Programming\Simple_Project\
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
mingw32-g++.exe -MM   -MF .deps/main.d -MT .objs/main.o -ID:/Compilers/mingw  main.cpp
mingw32-make.exe: [.deps/main.d] Error 258 (ignored)
.deps/main.d: No such file or directory
mingw32-make.exe: *** [.deps/main.d] Error 1
Process terminated with status 1 (0 minutes, 0 seconds)


I can't see anything here that tells me anything that I can fix. I'm slightly confused about the /usr/bin/sh  since I'm running Windows.
Does anyone have an idea?

    many thanks

    hugo

Navigation

[0] Message Index

[#] Next page

Go to full version