Error No Fltk-config Is Found
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to install FLTK library on ubuntu 14.04 up vote 2 down vote favorite I have been trying to install this FLTK library: sudo apt-get install libfltk1.3-dev sudo apt-get install libx11-dev I created simple main.cpp: #include #include #include using namespace fltk; int main(int argc, char **argv) { Window *window = new Window(300, 180); window->begin(); Widget *box = new Widget(20, 40, 260, 100, "Hello, World!"); box->box(UP_BOX); box->labelfont(HELVETICA_BOLD_ITALIC); box->labelsize(36); box->labeltype(SHADOW_LABEL); window->end(); window->show(argc, argv); return run(); } and tried to compile using: g++ -o win main.cpp After this failure I followed the original instruction what come with FLTK which looked like this Open a shell and install some software: sudo apt-get install g++ sudo apt-get install gdb sudo apt-get install subversion sudo apt-get install autoconf sudo apt-get install libx11-dev sudo apt-get install libglu1-mesa-dev These two are optional, but highly recommended: sudo apt-get install libasound2-dev sudo apt-get install libxft-dev If you are planning to use the Code::Blocks IDE, also install this sudo apt-get install codeblocks I like to use subversion to install the latest FLTK-1.3.release: svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3 To update to the latest version, just go into the fltk-1.3 directory and type svn update FIXME: no FL_SYMBOL font
fltk Issues related to software problems. Post Reply Print view Search Advanced search 7 posts • Page 1 of 1 vaina Posts: 27 Joined: 2010/12/06 07:57:11 [SOLVED] installing fltk Quote Postby vaina » 2010/12/08 21:53:09 I'm trying to install fltk withCode: Select allyum install fltkbut I obtainLoaded plugins: fastestmirror, prioritiesLoading mirror speeds from cached hostfile * addons: mirrors.prometeus.net * base: mirrors.prometeus.net * elrepo: elrepo.reloumirrors.net * extras: mirrors.prometeus.net * updates: mirrors.prometeus.net15 packages excluded due to repository priority protectionsSetting up Install ProcessNo package fltk available.Nothing to doI need those libraries: how can I fix the problem, without risking to overwrite any core http://askubuntu.com/questions/627786/how-to-install-fltk-library-on-ubuntu-14-04 or important CentOS packages? Top milosb Posts: 661 Joined: 2009/01/18 00:39:15 Location: 44 49′14″N 20 27′44″E Contact: Contact milosb WLM Re: installing fltk Quote Postby milosb » 2010/12/08 23:23:52 You don't seem to be that new to this forum, so I'm wondering how come you can't solve this one by yourself by now? Anyhow, the package you're looking for (fltk) is available in the RPM Forge repository: CentOS http://www.centos.org/forums/viewtopic.php?t=21520 3rd party repositoriesAnd to make sure you don't overwrite any of the CentOS base packages, i suggest you read the following: Yum PrioritiesRegards, Top vaina Posts: 27 Joined: 2010/12/06 07:57:11 Re: installing fltk Quote Postby vaina » 2010/12/09 09:36:57 I'm completely new to this forum and CentOS. I come from Ubuntu - and that seems like Windows to me now I installed CentOS a few days ago, I reinstalled it yesterday because I made a big mess with RPMForge and ATrpms repositories, I learned how to use yum priorities yesterday.Anyway, I added RPMForge, I set its priority on 4, I installed ftlk. Thanks for your help. Top milosb Posts: 661 Joined: 2009/01/18 00:39:15 Location: 44 49′14″N 20 27′44″E Contact: Contact milosb WLM Re: installing fltk Quote Postby milosb » 2010/12/09 09:51:39 vaina wrote:I reinstalled it yesterday because I made a big mess with RPMForge and ATrpms repositories, I learned how to use yum priorities yesterday.Anyway, I added RPMForge, I set its priority on 4, I installed ftlk. Thanks for your help.You're welcome. Good thing that you've reinstalled it, otherwise, you were likely to experience further dependency problems later. Top vaina Posts: 27 Joined: 2010/12/06 07:57:11 Re: installing fltk Quote Postby
All programs must include the file . In addition the program must include a header file for each FLTK class it uses. Listing 1 shows a simple "Hello, World!" program that uses FLTK to display the window. http://www.fltk.org/documentation.php/doc-1.1/basics.html Listing 1 - "hello.cxx" #include #include #include int main(int argc, char **argv) { Fl_Window *window = new Fl_Window(300,180); Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!"); box->box(FL_UP_BOX); box->labelsize(36); box->labelfont(FL_BOLD+FL_ITALIC); box->labeltype(FL_SHADOW_LABEL); window->end(); window->show(argc, argv); return Fl::run(); } After including the required header files, the program then creates a window. All following widgets will automatically be children of this window. Fl_Window *window = new Fl_Window(300,180); Then we create a box with the "Hello, World!" string error no in it. FLTK automatically adds the new box to window, the current grouping widget. Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!"); Next, we set the type of box and the size, font, and style of the label: box->box(FL_UP_BOX); box->labelsize(36); box->labelfont(FL_BOLD+FL_ITALIC); box->labeltype(FL_SHADOW_LABEL); We tell FLTK that we will not add any more widgets to window. window->end(); Finally, we show the window and enter the FLTK event loop: window->show(argc, argv); return Fl::run(); The resulting program will display the error no fltk-config window in Figure 2-1. You can quit the program by closing the window or pressing the ESCape key. Figure 2-1: The Hello, World! Window Creating the Widgets The widgets are created using the C++ new operator. For most widgets the arguments to the constructor are: Fl_Widget(x, y, width, height, label) The x and y parameters determine where the widget or window is placed on the screen. In FLTK the top left corner of the window or screen is the origin (i.e. x = 0, y = 0) and the units are in pixels. The width and height parameters determine the size of the widget or window in pixels. The maximum widget size is typically governed by the underlying window system or hardware. label is a pointer to a character string to label the widget with or NULL. If not specified the label defaults to NULL. The label string must be in static storage such as a string constant because FLTK does not make a copy of it - it just uses the pointer. Creating Widget hierarchies Widgets are commonly ordered into functional groups, which in turn may be grouped again, creating a hierarchy of widgets. FLTK makes it easy to fill groups by automatically adding all widgets that are created between a myGroup->begin() and myGroup->end(). In this example, myGroup would