How to install FLTK for VS2010?

Hey guys, this is my first post here, so please come with me.

I am doing a project for a school to include a GUI form. Unfortunately, I have no experience with GUIs, so I just spent the last few hours comparing different tool kits and installed its light weight on the FLTK. I also spent time trying to install FLTK by reading various manuals, but to no avail.

I was wondering if anyone could tell me what to do step by step. thanks in advance

BTW I am using Visual Studio 2010 Professional with Windows 7

+4
source share
4 answers

You must first download fltk from the website (it could be .zip or .tar). I downloaded fltk1.3.x ...)

Then you extract it, open the folder and find the file with the extension .dsw . (mine was in a folder called ide). This file will open the Visual Studio solution.

He will probably ask you to upgrade the solution to the current version of Visual Studio. Say yes to everyone.

When the project opens, click Build / Build. It takes some time to build.

Then from the lib folder, copy the .lib files (except readme.lib) to the ProgramFilesx86/MicrosoftVisualStudio10/VC/lib folder.

Then copy the FL folder to ProgramFilesx86/MicrosoftVisualStudio10/VC/include .

installation is complete ... for more details, you can familiarize yourself with the principles of programming and practice using C ++ from Stroustrup.

+6
source

I have a blog post that shows you how.

This was done in VS2003, but similar instructions there were the same for VS2010.

After installing, unpacking and creating fltk download , you should make sure that the following things are taken into account in your project properties:

  • Add the necessary additional include directories.
  • In the project properties → linker → contribution → additional dependencies, make sure that the {fltkd, wsock32, comctl32} .lib libraries are included.
  • In the Project → Linker → General → Additional Library Directories properties, make sure that the correct path to the fltk library files is specified.
  • In the Project Properties field → C / C ++ → Code Generation → Runtime Library, make sure that the "Multi-threaded DLL (/ MDd) debugging" field is selected.

Then you can try a simple example, for example the following Hello World example:

 #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Box.H> 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(); } 
+4
source

Ten years ago, Greg Ercolano made a video on how to set up a Visual Studio 7 project that uses FLTK. Take a look at his excellent (FLTK related) videos . This process should not be very different from any new Microsoft (R) VisualStudio (TM). Also, I highly recommend taking a look at the Greg " " FLTK Cheat Sheet Page ".

+1
source

I understand that this question is old, but ...

Now FLTK can be installed directly through NuGet. No need to do anything manually.

https://blogs.msdn.microsoft.com/vcblog/2015/02/13/find-your-favorite-library-for-c-in-nuget/

Just search for “FLTK” using the NuGet package manager.

0
source

All Articles