Author Topic: Help an idiot setup Codeblocks  (Read 16682 times)

Rocketmagnet

  • Guest
Help an idiot setup Codeblocks
« on: January 27, 2005, 07:27:30 pm »
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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Help an idiot setup Codeblocks
« Reply #1 on: January 27, 2005, 10:47:59 pm »
Quote from: Rocketmagnet

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

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.
Be patient!
This bug will be fixed soon...

Rocketmagnet

  • Guest
Help an idiot setup Codeblocks
« Reply #2 on: January 27, 2005, 11:53:18 pm »
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 :(

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Help an idiot setup Codeblocks
« Reply #3 on: January 28, 2005, 12:00:23 am »
Quote from: Rocketmagnet
Compiler's Installation Directory  =  D:\Compilers\mingw\bin
This is *definately* the right directory, and these files *do* all exist.


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.
Be patient!
This bug will be fixed soon...

Rocketmagnet

  • Guest
Help an idiot setup Codeblocks
« Reply #4 on: January 29, 2005, 02:11:41 am »
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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Help an idiot setup Codeblocks
« Reply #5 on: January 29, 2005, 11:03:57 am »
The problem is that the ".deps" directory is not created. If you create it by hand, you 'll get the same error for the ".objs" dir (the deault object output dir)...

My guess would be that you have a non-standard "mkdir" executable, most likely D:\Compilers\MinGW\bin\mkdir.exe (or else, search for it in your PATH). Try moving this file elsewhere (or renaming it) so that the windows "mkdir" command is called when building...

Yiannis.
Be patient!
This bug will be fixed soon...

Rocketmagnet

  • Guest
Help an idiot setup Codeblocks
« Reply #6 on: January 29, 2005, 07:07:11 pm »
YES !!

Finally got it working.  Thank you thank you a million times.
Jesus that was hard.