JCHub

  • Home
  • Category
    • A/V
    • WebRTC
    • Beauty of Programming
    • Linux
    • Windows
    • Moments of Life
    • Campus Life
  • Reference
    • API Reference
    • Utilities
    • AV Test
    • Doc
  • Message Board
  • About
JCHub
Code as My Sword, Lost in Obsession
  1. Main page
  2. Beauty of Programming
  3. Main content

FLTK程序编译错误

2015年6月16日 1838hotness 0likes 0comments

最近在写一些小工具,打算用一个体积小,跨平台,不要求界面美观的GUI库,QT太庞大,后来在stackoverflow找到了FLTK这个库,刚好满足我的要求,话说这个GUI库写的界面确实很丑。从FLTK官网下载了1.3.3的代码,解压,打开IDE文件夹里的VisualC2010文件夹中的fltk.sln编译即可得到需要的lib文件(我用的是vs2012),没有什么难度,不明白的可以参考http://www.c-jump.com/bcc/common/Talk2/Cxx/FltkInstallVC/FltkInstallVC.html。

构建我的第一个FLTK程序时遇到了一个问题,程序报如下错误:

C++
1
2
3
1>D:\vs2012\GUI\fltk\fltk-1.3.3\FL\math.h(22): fatal error C1083:
Cannot open include file: '/usr/include/math.h': No such file or directory
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

我想我用的是VS编译的,是windows系统啊,又不是linux系统,怎么会报这个错误,而且要用的头文件以及.lib文件我都包含了。后来上谷歌找了一段时间,在一个论坛找到了答案(虽然作者没有明确提出解决方法,但我明白了作者意思),把FL文件夹里的math.h文件移除就可以,重新编译就不会报这个错误了,这解决方法也太暴力了吧。

虽然FLTK写出来的界面很丑,不过对于小工具而言可以了,只有几百Kb的程序,能用就行,只需要简单的几个控件即可。
FLTK编译

This article is licensed with Creative Commons Attribution-NonCommercial-No Derivatives 4.0 International License
Tag: C++
Last updated:2018年12月23日

Jeff

管理员——代码为剑,如痴如醉

Tip the author Like
< Last article
Next article >

Comments

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
Cancel

This site uses Akismet to reduce spam. Learn how your comment data is processed.

相关文章
  • 网络字节转换到本地字节的函数模板
  • MFC自绘带背景颜色标题栏
  • VC++获取本机IP地址
  • C++实现windows重启
  • Windows下获取当前屏幕分辨率

COPYRIGHT © 2026 jianchihu.net. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang