User forums > Help

Error on Startup

(1/2) > >>

Supercap2F:
Hello Everyone! Hope I'm in the right place.  ;D

To introduce myself, I'm 14 and have a deep interest in electronics/circuit design. I needed to learn the syntax of C so I could program microcontrollers. So I picked up a copy of C for dummies and they said to get Code::Blocks. Tell me if I'm wrong but I think what you can do with Code::Blocks is you can:

1) Wirte your program in it
2) Compile and link you program
3) Run your program.

OK, now the problem is that when I startup Code::Blocks I get this message on the bottom of the screen:
"Can't find compiler executable in your configured search path's for Microsoft Visual C ++ Toolkit 2003"
Did I install it wrong? Is there something I can do to fix it? If so then what?

Thanks for all your time! :)


BlueHazzard:

--- Quote from: Supercap2F on July 30, 2014, 02:39:06 pm ---Code::Blocks is you can:

1) Wirte your program in it
2) Compile and link you program
3) Run your program.

--- End quote ---
not completely true. You can compile and link your program with the help of c::b, but c::b can't do this from his own. c::b needs a compiler and liker to compile/link your source files.
So when you install c::b "normally" you don't install a compiler. You have to choose and install it yourself. (i wrote normally, because there exists a bundle installer with c::b and tdm mingw gcc)

Your error is a indication that you don't have a compiler installed.
So the solution is easy: install a compiler, or if you have already installed a compiler, fix the paths in the settings (settings->compiler->toolchain executables)

You don't provide any information about your OS, or what compiler you want to use, so i can't help you any future...

you can find a lot help here: http://wiki.codeblocks.org/index.php?title=FAQ
[Edit:] and here: http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler

greetings

pirx67:
Hi,

at first it would be very helpful if you told us what version of Code::Blocks you did download and install.

I assume that you're running under Windows because Code::Blocks's output suggests being on Windows.

A web search revealed the C-for-dumies web site @ http://c-for-dummies.com/caio/compilers.php
where the author refers to this Code::Blocks download page http://www.codeblocks.org/downloads/26.

Assuming you followed these links: Which release did you download?

* codeblocks-13.12-setup.exe: The plain Code::Blocks without any compiler
* codeblocks-13.12mingw-setup.exe: A Code::Blocks release with a MinGW Compiler bundled
* codeblocks-13.12mingw-setup-TDM-GCC-481.exe: A Code::Blocks release with a bleeding edge MinGW
You have to understand that Code::Blocks itself is not a compiler and not able to generate an executable program.
It is "only" a fancy GUI for the compiler with a nice editor that has some knowledge of the C syntax and many
other features that make the developer's life easier.

Knowing that you need to install a suitable compiler for your target system at first. This could be one of the
Microsoft Compilers or MinGW (a GCC variant for Windows) for example. Then you point Code::Blocks to the installation path
of the compiler and it will use it.

To make that process easier the codeblocks-13.12mingw-setup.exe installer provides a bundle of Code::Blocks and MinGW for Windows.

For details on the installation refer to the following wiki pages http://wiki.codeblocks.org/index.php?title=Installing_the_latest_official_version_of_Code::Blocks_on_Windows and http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler.
The latest official release is atm. 13.12.

Note:
You mentioned that you want to program microcontrollers. Depending on the type of microcontroller you need a compiler that fits to the
used microcontroller (like AVR-GCC for AVR microcontrollers). The before mentioned compilers will generate code that can only be run
under Windows!

I hope that points you in the right direction.

Regards,
    pirx67

PS.: At the moment I saw that BlueHazzard has answered your questions already but I don't like to discard this post now and
submit it anyway.

Supercap2F:
WOW, lots of good info here! Thanks Guys!


--- Quote from: BlueHassard ---not completely true. You can compile and link your program with the help of c::b, but c::b can't do this from his own. c::b needs a compiler and liker to compile/link your source files.
--- End quote ---

OK, that makes since. I might have some more questions on this later though.


--- Quote ---So when you install c::b "normally" you don't install a compiler. You have to choose and install it yourself. (i wrote normally, because there exists a bundle installer with c::b and tdm mingw gcc)
--- End quote ---

--- Quote from: pirx67 ---A web search revealed the C-for-dumies web site @ http://c-for-dummies.com/caio/compilers.php
where the author refers to this Code::Blocks download page http://www.codeblocks.org/downloads/26.

Assuming you followed these links: Which release did you download?
codeblocks-13.12-setup.exe: The plain Code::Blocks without any compiler
codeblocks-13.12mingw-setup.exe: A Code::Blocks release with a MinGW Compiler bundled
codeblocks-13.12mingw-setup-TDM-GCC-481.exe: A Code::Blocks release with a bleeding edge MinGW
--- End quote ---

Yes I followed the link, and downloaded the "codeblocks-13.12mingw-setup.exe".


--- Quote from: BlueHazzard ---You don't provide any information about your OS, or what compiler you want to use, so i can't help you any future...
--- End quote ---

I'm using Windows 7 32 bit. I think that I want to use MinGW.


--- Quote from: pirx67 ---You have to understand that Code::Blocks itself is not a compiler and not able to generate an executable program.
It is "only" a fancy GUI for the compiler with a nice editor that has some knowledge of the C syntax and many
other features that make the developer's life easier.

Knowing that you need to install a suitable compiler for your target system at first. This could be one of the
Microsoft Compilers or MinGW (a GCC variant for Windows) for example. Then you point Code::Blocks to the installation path
of the compiler and it will use it.
--- End quote ---

OK, I think I get that too.


--- Quote ---To make that process easier the codeblocks-13.12mingw-setup.exe installer provides a bundle of Code::Blocks and MinGW for Windows.

For details on the installation refer to the following wiki pages http://wiki.codeblocks.org/index.php?title=Installing_the_latest_official_version_of_Code::Blocks_on_Windows and http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler.
The latest official release is atm. 13.12.
--- End quote ---

OK, I will have a look at those links.


--- Quote ---Note:
You mentioned that you want to program microcontrollers. Depending on the type of microcontroller you need a compiler that fits to the
used microcontroller (like AVR-GCC for AVR microcontrollers). The before mentioned compilers will generate code that can only be run
under Windows!
--- End quote ---

I was going to be programing PICs with MPLAB. I just got Code::Blocks to learn C. :)

OK, so I went to Settings->Complier->Toolchain executables. Under "Compiler's installed directory" I put the path to MinGW that came with Code::Blocks. Hit OK, and I still gives me the error message. Did I do something wrong?

Thanks Guys! I can't wait to start programing in C!  ;D








Vuki:
Change your project to use MinGW compiler, not the MS Toolkit (Project, Properties).

Navigation

[0] Message Index

[#] Next page

Go to full version