FLTK 1.3.3 MinGW 4.9.1 Configuration 配置

简介:

Download FLTK 1.3.3

Download CMake 3.2.0

Start CMake 3.2.0, fill the source and destination:

source: C:/FLTK/fltk-1.1.10

destination: C:/FLTK/build

Click Configure and use MinGW Makefiles to complie.

Change the following item:

CMAKE_INSTALL_PREFIX    [C:/FLTK/MinGW]

click Configure again.

After configure is done (No errors show), click Generate.

Go back to your build folder, open command line, type: mingw32-make

Wait a long time for make process, have a cup of coffee :)

After make is done, type mingw32-make install

Now, the configuration is done, enjoy it :)

Let's test our installation. First create a test.cpp:

#include "FL/Fl.h"
#include "FL/Fl_Box.h"
#include "FL/Fl_Window.h"

int main()
{
    Fl_Window window(500,500, "Test");
    Fl_Box box(0,0,500,500,"Hello World!");
    window.show();
    return Fl::run();
}

Then create the CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(TestFLTK)
SET(FLTK_DIR C:\\FLTK\\MinGW)
SET(FLTK_FLUID_EXECUTABLE C:\\FLTK\\MinGW\\bin)
SET(FLTK_INCLUDE_DIR C:\\FLTK\\MinGW\\include)
SET(FLTK_LIBRARIES C:\\FLTK\\MinGW\\lib)
FIND_PACKAGE(FLTK)
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})

set(Sources
    test.cpp
)
ADD_EXECUTABLE(${PROJECT_NAME} ${Sources})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${FLTK_LIBRARIES})

本文转自博客园Grandyang的博客,原文链接:配置FLTK 1.3.3 MinGW 4.9.1 Configuration ,如需转载请自行联系原博主。

相关文章
|
存储 Cloud Native Linux
QtCreator中三种不同编译版本 debug、release、profile 的区别
QtCreator中三种不同编译版本 debug、release、profile 的区别
|
3月前
|
Java Android开发
Eclipse 运行配置(Run Configuration)
Eclipse 运行配置(Run Configuration)
125 1
|
9月前
|
Java Maven
maven加入lib然后add as library
maven加入lib然后add as library
93 0
|
Windows
CMake 如何设置 Debug 和 Release 下的不同配置
CMake 设置 Debug 和 Release 下不同的工程依赖库,编译选项宏隔离等
963 1
CMake 如何设置 Debug 和 Release 下的不同配置
Qt5Error:msvc-version.conf loaded but QMAKE_MSC_VER ins‘t set
Qt5Error:msvc-version.conf loaded but QMAKE_MSC_VER ins‘t set
513 0
|
Java iOS开发
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
152 0
jogbuild-common.xml:17: Cannot find /home/tsit/tio-software/jogamp/gluegen/make/gluegen-cpptasks.xml
jogbuild-common.xml:17: Cannot find /home/tsit/tio-software/jogamp/gluegen/make/gluegen-cpptasks.xml
73 0
编译OpenJDK8:No CONF given, but more than one configuration found in
编译OpenJDK8:No CONF given, but more than one configuration found in
98 0
|
开发工具 C++
【错误记录】NDK 配置错误 ( C/C++ debug|arm64-v8a : Could not get version from cmake.dir path )
【错误记录】NDK 配置错误 ( C/C++ debug|arm64-v8a : Could not get version from cmake.dir path )
1949 0
【错误记录】NDK 配置错误 ( C/C++ debug|arm64-v8a : Could not get version from cmake.dir path )