Sterling
Sterling

Reputation: 4213

How can I compile a fltk program using g++ in Ubuntu?

How can I compile a fltk program using g++ in Ubuntu?

Straight-forward question. I've been searching for and trying many things for a couple hours now. Some of the examples I have seen require X11R6, but I can only find X11 on my computer. If anyone can tell me, I would be extremely grateful.

Upvotes: 1

Views: 3031

Answers (4)

inamist
inamist

Reputation: 61

g++ `fltk-config --cxxflags` file22.cpp `fltk-config --ldflags` -o go

don't forget the backtiks!;)

Upvotes: 0

keghn
keghn

Reputation: 61

Open a terminal. cd to the directory that has your text file named file22.cpp or what ever you saved as. Type:

g++ fltk-config --cxxflags file22.cpp fltk-config --ldflags -o go

To run type:

./go

I have used this with Ubuntu 8 to Ubuntu 12.10 and Mint 13 and Mint 14. Which are all Linux.

Files22.cxx is used if the GUI Fluid is used.

g++ fltk-config --cxxflags file22.cxx fltk-config --ldflags -o go

Upvotes: 2

DejanLekic
DejanLekic

Reputation: 19787

Sterling, all you need to know is on this page: http://www.fltk.org/doc-1.3/basics.html

Upvotes: 0

Employed Russian
Employed Russian

Reputation: 213526

X11 that you have is X11R6.

You'll get a better answer if you tell us what your actual problem is.

Upvotes: 0

Related Questions