Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

code::blocks build and run error

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
reiko
Posts: 100
Joined: 2015-09-02 22:40

code::blocks build and run error

#1 Post by reiko »

It seems that this project has not been built yet.
Do you want to build it now?

thats the message that i get every time i try to test my program

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: code::blocks build and run error

#2 Post by stevepusser »

Not much to go on here...What program? How are you building (compiling) it, then?
MX Linux packager and developer

reiko
Posts: 100
Joined: 2015-09-02 22:40

Re: code::blocks build and run error

#3 Post by reiko »

stevepusser wrote:Not much to go on here...What program? How are you building (compiling) it, then?
just install code blocks open new console projects and try to run even the hello world program and i get this error
with default settings code blocks ver 13.12

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: code::blocks build and run error

#4 Post by stevepusser »

I would guess you are not compiling the example program into an executable binary then. C code just doesn't run as is, it needs that step first.
MX Linux packager and developer

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: build and run error

#5 Post by GarryRicketson »

There are some wonderfull "tools" available, they are called "search engines",
Some are better the others. http://startpage.com is one.
You can copy these key words :
code::blocks build and run error
and paste them into the little window, on the search engine page.
Then you get all sorts of results, related to this error message. The search can be narrowed down, if you include some more specfic information, IE:
Using a Debian System , code::blocks build and run error
or perhaps include what "compiler" you are using,
----------------------
These are a couple, I found doing the search for you.
I couldn't do a very good search, because you really have not given enough details at all, just guessing, as to what OS you are using, what compiler, etc,...

http://wiki.codeblocks.org/index.php?ti ... g_(errors)
http://superuser.com/questions/719021/c ... iler-error
C++ may be some what advanced for you, it might be better if you start with something a little more "basic" first, and there is another topic all ready started here on the forum: That you started, I am not sure why you started another: http://forums.debian.net/viewtopic.php? ... 96#p592136
I do notice though, this one has been started here in the "Programming" forum, so that is fine,..this is the right place to ask these kind of questions.
----------------------------------------------------------------------------------------------------------
Just a additional note, kind off the topic,but:
I may have mentioned this before, you really should also read these:
Thank you, and please don't take me wrong, I am not trying to "put you down" or anything, we all start out "new" and the learning process is a continues, on going process. My hopes are that you do read carefully the material I am suggesting, and it is of a help to you.
Last edited by GarryRicketson on 2015-09-14 22:17, edited 1 time in total.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: code::blocks build and run error

#6 Post by GarryRicketson »

I do want to apologize, "code::blocks" is the IDE you are using, I kind of missed that,
I am assume you are using the version in the Debian Repositories, on a Debian system ?
Code::Blocks is a cross-platform Integrated Development Environment (IDE).
It is based on a self-developed plugin framework allowing unlimited
extensibility. Most of its functionality is already provided by plugins.
Plugins included in the base package are:
* Compiler frontend to many free compilers
* Debugger frontend for GDB (and CDB for windows platforms)
* Source formatter (based on AStyle)
* Wizard to create new C++ classes
* Code-completion / symbols-browser (work in progress)
* Default MIME handler
* Wizard to create new Code::Blocks plugins
* To-do list
* Extensible wizard based on scripts
* Autosave (saves your work in the unfortunate case of a crash)
I do not know much about this myself, but. Do you also have a compiler installed ?
And this may be of help to you:
http://www.codeblocks.org/user-manual
------------------------------------------------------TIP--------------------------------------------
Also, when one is trying to get help on a program they are trying to make, even if it is just a simple "hello world" program, it is best to include the "script" or code you are trying to use. This must be enclosed in the

Code: Select all

[code] boxes 
[/code] or it should be,Example:
This is the code I have, but I can not get it to compile correctly,..

Code: Select all

 #include <iostream>
 
using namespace std;
 
int main
{
    cout << "Hello world!" << endl;
    return 0;
}
This may be of some help too:
http://wiki.codeblocks.org/index.php?ti ... ello_world
But honestly, I can not understand, why any one would want to try to write a "hello world" program, using such a complicated method, when they could just do it with a simple bash script, from the command line,..
From: http://linuxcommand.org/wss0010.php

Code: Select all

 #!/bin/bash
# My first script

echo "Hello World!"
the rest of the details are in the above link.

tomazzi
Posts: 730
Joined: 2013-08-02 21:33

Re: code::blocks build and run error

#7 Post by tomazzi »

Actually, the 13.12 release in the repositories is the worst one which You can find - this is simply one of the worst versions ever released by the code::bocks team. I'm using code::blocks as my primary IDE, so You can trust me... or maybe not? ;)

The last "stable" and "official" build was a 12.04 (I think) ... I don't remember the exact version number because I'm using nightly builds versions which are just great (at the moment I'm using the "svn build rev 10484 (2015-09-05 12:57:13) gcc 4.7.2 Linux/unicode - 64 bit " - and it works just as it should)

This can be a bit embarrassing, but nightly builds are in fact more stable than the "official, stable builds". This is mainly because the C::B is now switching from the deprecated wxWidgets version 2.8.12 (old stable) to a new v3.x.x

Learn how to compile Autotools projects - in fact, this is really easy - and You'll get the most bleeding edge software "just like that" ;)

Regards.
Odi profanum vulgus

マーズ maazu
Posts: 23
Joined: 2015-05-04 05:13
Location: kuala lumpur

Re: code::blocks build and run error

#8 Post by マーズ maazu »

Me 2. Nightly build is fine for me.
tomazzi wrote:Actually, the 13.12 release in the repositories is the worst one which You can find - this is simply one of the worst versions ever released by the code::bocks team. I'm using code::blocks as my primary IDE, so You can trust me... or maybe not? ;)

The last "stable" and "official" build was a 12.04 (I think) ... I don't remember the exact version number because I'm using nightly builds versions which are just great (at the moment I'm using the "svn build rev 10484 (2015-09-05 12:57:13) gcc 4.7.2 Linux/unicode - 64 bit " - and it works just as it should)

This can be a bit embarrassing, but nightly builds are in fact more stable than the "official, stable builds". This is mainly because the C::B is now switching from the deprecated wxWidgets version 2.8.12 (old stable) to a new v3.x.x

Learn how to compile Autotools projects - in fact, this is really easy - and You'll get the most bleeding edge software "just like that" ;)

Regards.

reiko
Posts: 100
Joined: 2015-09-02 22:40

Re: code::blocks build and run error

#9 Post by reiko »

i solved this. code::blockes compile C with g++ compiler instead of gcc. g++ is not installed by debian in default so i had
to install the compiler myself apt-get install g++ tnx for the help everybody

tomazzi
Posts: 730
Joined: 2013-08-02 21:33

Re: code::blocks build and run error

#10 Post by tomazzi »

Code Blocks build system is using g++ for linking mode, even if the project is purely a C project - this is not essentially a bug, but You should be aware of this .... hmm ... "phenomenon" (this is the way the libtool works, btw). ALWAYS make sure that Your files are compiled with the correct tags: CC or CPP - otherwise unpredictable errors are *very* likely to occur...

Regards.
Odi profanum vulgus

runfrodorun
Posts: 202
Joined: 2013-06-19 05:09

Re: code::blocks build and run error

#11 Post by runfrodorun »

g++ will **almost** compile C code. The main contention is the naming of the include libraries, you would call stdio.h cstdio and so on and so fourth. I believe there are some other minor differences but C++ is /generally/ a superset of C with some extra syntax rules.

-RJ

edit: Found out just an hour ago on a friend's ubuntu image that g++ actually did resolve legacy C include files. So I guess I haven't kept up with the times with default include search paths. Anyway, sorry for the confusion.
Much opinionated.
Some abrasive.
No systemd.
Wow.

Post Reply