Ubuntu : how do I write a C++ application

Upgraded to Ubuntu 8.10

Is g++ installed by default ? yes

Programmer’s editor ? gedit

Quick guide to Hello World

rudi@rudi-laptop:~/devcpp$ g++ hello.cpp -o hello
rudi@rudi-laptop:~/devcpp$ ./hello
Hello, world!

So far, so good.

It looks like graphics is done with GL and glut on top of it – among other possibilities.

Somoone wrote :

Why not simply bring up synaptic and install:

  • freeglut3
  • freeglut3-dbg
  • freeglut3-dev

On my Ubuntu, Synaptic shows freeglut3 and libglut3 as installed.
But not freeglut3-dbg and freeglut3-dev … install them.

OK, compilation succeeds, but link fails.
Ah, this links :
$ g++ helloglut.cpp -o helloglut -lGL -lglut

$ ./helloglut

And it works.

Next :

How do I package an application ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s