Skip to content

Instantly share code, notes, and snippets.

@stgatilov
Created June 1, 2024 12:37
Show Gist options
  • Save stgatilov/f8b8a1a488206fe2889f7e7e2f99438c to your computer and use it in GitHub Desktop.
Save stgatilov/f8b8a1a488206fe2889f7e7e2f99438c to your computer and use it in GitHub Desktop.
conan: MSVC runtime settings ignored by FLTK
cmake_minimum_required (VERSION 3.9.6)
project(testapp)
find_package(fltk REQUIRED)
add_executable(testapp test.cpp)
target_link_libraries(testapp fltk::fltk)
[requires]
fltk/1.3.9
[generators]
CMakeDeps
CMakeToolchain
#include <FL/Fl.H> /* FLTK main FLTK */
#include <FL/Fl_Window.H> /* FLTK window FLTK */
#include <FL/Fl_Button.H> /* FLTK button FLTK */
#include <stdio.h> /* I/O lib ISOC */
#include <stdlib.h> /* Standard Lib ISOC */
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void daButCall(Fl_Widget *w, void *uData)
{
printf("The button was pressed\n");
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int main()
{
Fl_Window win(500, 70, "Simple Button Demo Program");
Fl_Button but(20, 20, 460, 30, "Test Button");
but.callback(daButCall, (void *)0);
win.show();
return Fl::run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment