Course list http://www.c-jump.com/bcc/

Lab 1: FLTK Library and Visual Studio C++ Project Configuration


  1. Fast Light Toolkit Library
  2. CIS-255 Lab Directory Configuration
  3. CIS-255 Laboratory Download
  4. Hello, GUI!
  5. C++ headers and LIB files
  6. How to submit
  7. If something goes wrong...
  8. Downloading and Getting Started with FLTK
  9. Building FLTK library
  10. Copy FLTK binary files to c255labs
  11. Optional: Visual Studio Project Configuration

1. Fast Light Toolkit Library



2. CIS-255 Lab Directory Configuration



3. CIS-255 Laboratory Download



4. Hello, GUI!



5. C++ headers and LIB files



6. How to submit


7. If something goes wrong...



8. Downloading and Getting Started with FLTK


  1. Download the source of the latest stable release version (e.g. fltk-N.N.N-source.tar.gz) from FLTK library website. FLTK is a cross-platform tool that works with Microsoft Visual Studio on Windows, as well as Linux and MAC OS.

  2. Unzip the downloaded file. The process takes two steps: first, it unzips into a .tar file. Next, unzip the .tar file, which creates a subdirectory named fltk-N.N.N.

  3. Download and install CMake GUI from cmake.org
    Open the website and scroll down to Binary distributions. Choose Windows x64 Installer such as

    
        cmake-4.1.0-rc4-windows-x86_64.msi
    
    

    This will download the Windows Installer (.msi) (64-bit version).

  4. Run CMake GUI installer.

  5. Start CMake GUI application.

  6. When CMake GUI dialog opens:

  7. Close CMake GUI application.

     


9. Building FLTK library


  1. In Visual Studio, select Build -> Build Solution.

    Be patient while the surce code is being compiled. It may take several minutes to complete. If everything is okay, you should see the outputs similar to the examples provided below.

  2. The results of the build are in

    
        C:/Projects/fltk-1.4.4/build/bin
        C:/Projects/fltk-1.4.4/build/lib
    
    

    Here is sample Debug x64 output:

    
    Build started at 4:58 PM...
        ...
    3>Done building project "html.vcxproj" -- FAILED. <<<==== Ignore this error
        ...
    117>Generating Code...
    117>checkers.vcxproj -> C:\Projects\fltk-1.4.4\build\bin\test\Debug\checkers.exe
    119>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------
    119>Building Custom Rule C:/igor/Projects/fltk-1.4.4/CMakeLists.txt
    120>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
    120>Project not selected to build for this solution configuration 
    ========== Build: 116 succeeded, 1 failed, 0 up-to-date, 3 skipped ==========
    ========== Build completed at 5:04 PM and took 05:45.012 minutes ==========
    
    

    Here is a sample Release x64 output:

    
    1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
    1>1>Checking Build System
    2>------ Skipped Build: Project: uninstall, Configuration: Release x64 ------
    2>Project not selected to build for this solution configuration 
    3>------ Build started: Project: html, Configuration: Release x64 ------
    4>------ Build started: Project: fltk_z, Configuration: Release x64 ------
    5>------ Build started: Project: fltk_jpeg, Configuration: Release x64 ------
    6>------ Build started: Project: fltk, Configuration: Release x64 ------
    3>Converting Doxyfile to doxygen version 1.8.9
    3>'C:\Projects\fltk-1.4.4\documentation\convert_doxyfile' is not recognized as an internal or external command,
    3>operable program or batch file.
    3>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066
    3>Done building project "html.vcxproj" -- FAILED. <<<==== Ignore this error
    7>------ Skipped Build: Project: docs, Configuration: Release x64 ------
    7>Project not selected to build for this solution configuration 
    5>Building Custom Rule C:/igor/Projects/fltk-1.4.4/jpeg/CMakeLists.txt
        ...
    118>Generating Code...
    117>checkers.vcxproj -> C:\Projects\fltk-1.4.4\build\bin\test\Release\checkers.exe
    118>CubeView.vcxproj -> C:\Projects\fltk-1.4.4\build\bin\test\Release\CubeView.exe
    119>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
    119>Building Custom Rule C:/igor/Projects/fltk-1.4.4/CMakeLists.txt
    120>------ Skipped Build: Project: INSTALL, Configuration: Release x64 ------
    120>Project not selected to build for this solution configuration 
    ========== Build: 116 succeeded, 1 failed, 0 up-to-date, 3 skipped ==========
    ========== Build completed at 5:12 PM and took 02:14.811 minutes ==========
    
    
  3. Exit Visual Studio.

     


10. Copy FLTK binary files to c255labs



11. Optional: Visual Studio Project Configuration


  1. In Visual Studio, start by creating new project: File -> New ->Project.

  2. Choose "Empty Project" -- C++ Windows Console

  3. Specify project name

  4. Specify directory location of your project, such as

    
        C:\bcc\c255labs\myprojects
    
    

    NOTE: Project options outlined here are designed to build correctly when your project directory location is a subdirectory of C:\bcc\c255labs.

  5. Check option "Place solution and project in the same directory" -- checked

  6. Add your C++ source file(s). In our programming projects the source files are located under src subdirectory and later also in fluid_project subdirectory.

  7. Right-click project name in Solution Explorer and select Properties.

  8. Configurations: All Configurations Platform: Active(x64)

  9. C/C++

  10. Linker

  11. Configurations: Debug

  12. Linker

  13. Configurations: Release

  14. Linker

  15. Configurations: All Configurations Platform: Active(x64)

  16. Linker