New to programming, error message.

  • (2 Pages)
  • +
  • 1
  • 2

25 Replies - 468 Views - Last Post: 18 April 2013 - 02:32 PM Rate Topic: -----

#16 david joh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 17-April 13

Re: New to programming, error message.

Posted 18 April 2013 - 01:43 PM

View Postjjl, on 18 April 2013 - 01:24 PM, said:

Post the command that you use at the terminal to compile your C++ program.

It should look something like this

g++ -Wall Untitled.cpp -o

Im sorry, but where is that?
Was This Post Helpful? 0
  • +
  • -

#17 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1051
  • View blog
  • Posts: 4,458
  • Joined: 09-June 09

Re: New to programming, error message.

Posted 18 April 2013 - 01:45 PM

How are you compiling your source file?
Was This Post Helpful? 0
  • +
  • -

#18 david joh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 17-April 13

Re: New to programming, error message.

Posted 18 April 2013 - 01:55 PM

You mean what compiler, or something else?
Was This Post Helpful? 0
  • +
  • -

#19 vividexstance  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 630
  • View blog
  • Posts: 2,109
  • Joined: 31-December 10

Re: New to programming, error message.

Posted 18 April 2013 - 01:59 PM

Yes what compiler are you using, and are you adding any arguments to the compiler (especially if it's being run from the command-line)?
Was This Post Helpful? 0
  • +
  • -

#20 david joh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 17-April 13

Re: New to programming, error message.

Posted 18 April 2013 - 02:08 PM

I'm using GNU GCC Compiler, and i havent changed any of the settings, so i dont believe so.
Was This Post Helpful? 0
  • +
  • -

#21 jimblumberg  Icon User is online

  • member icon


Reputation: 3848
  • View blog
  • Posts: 11,775
  • Joined: 25-December 09

Re: New to programming, error message.

Posted 18 April 2013 - 02:09 PM

He appears to be using Code::blocks:

Quote

Sorry, i think its Hello World.cbp


That .cpb extension is the extension Code::Blocks uses for it's project file.


Jim
Was This Post Helpful? 0
  • +
  • -

#22 david joh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 17-April 13

Re: New to programming, error message.

Posted 18 April 2013 - 02:16 PM

Yea, i changed the file extensions to .cpp, but i now have another error message.
Was This Post Helpful? 0
  • +
  • -

#23 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1051
  • View blog
  • Posts: 4,458
  • Joined: 09-June 09

Re: New to programming, error message.

Posted 18 April 2013 - 02:20 PM

If you changed your project file (not source) extension from .cpb to .cpp, then you are getting confused with our advice. .cpb is just a file that codeblocks uses to manage the project.

My advice (since extensions seem to be mangled), create a new C++ project, not C, in code blocks and copy over the source. The only problem that were having in the beginning is that you are trying to compile a C++ source file under a C project.

This post has been edited by jjl: 18 April 2013 - 02:21 PM

Was This Post Helpful? 0
  • +
  • -

#24 david joh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 17-April 13

Re: New to programming, error message.

Posted 18 April 2013 - 02:21 PM

Where am i copying the source to?
Was This Post Helpful? 0
  • +
  • -

#25 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1051
  • View blog
  • Posts: 4,458
  • Joined: 09-June 09

Re: New to programming, error message.

Posted 18 April 2013 - 02:23 PM

Follow this tutorial

http://wiki.codebloc...g_a_new_project


Copy your source into main.cpp
Was This Post Helpful? 0
  • +
  • -

#26 david joh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 17-April 13

Re: New to programming, error message.

Posted 18 April 2013 - 02:32 PM

YES, it finally works, THANK YOU!!!!!!!!!!
Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2