c++ wt开发环境配置
·
最近看到一个开源库,c++ web toolkit库,
Wt是一个针对Web应用开发的C++ widget库。可以使用c++开发web应用,感觉相当的巴适啊。所以就来学习使用了,
这里方便将来回顾,so,在这里发布了写白痴的博客,方便将来查看。
首先要编译wt库,我是使用Windows来做开发的,故在网上下了个现成的
地址:http://sourceforge.net/projects/witty/files/wt/
开始配置环境变量:官网给了说明:地址:http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_MS_Windows
注意其中:
To compile your own application, set the following properties in your MSVS project:
- In C/C++ -> General, Additional Include Directories: c:/location/of/wt-3.3.1/include
- In C/C++ -> Preprocessor, ensure that WIN32 is defined. Also define HPDF_DLL, which will allow you to generate pdf files.
- In Linker->General, Additional Library Directories: c:/location/of/wt-3.3.1/lib
- Go to Linker->Input. In the Additional Dependencies, fill out the Wt libraries you want to link to. At the topleft of the dialog, check the active Configuration. If it's Debug, link to wtd.lib, wthttpd.lib (and optionally wtdbod.lib, wtdbobackendXXXd.lib, ...). If it's release, link to wt.lib, wthttp.lib (and optionally wtdbo.lib, wtdbobackendXXX.lib). Notice that the debug libraries have a 'd' suffix. Be carefull. You need different libraries depending on the Release/Debug configuration, since it's not possible to mix different versions of the MSVC runtime libraries in one application.
If you want to run your fresh application, set these options:
- In the Debugging tab, set Command Arguments to
--docroot . --http-address 0.0.0.0 --http-port 8080 - In the Debugging tab, set Environment to PATH=c:/location/of/wt-3.3.1/bin
现在开始正常配置:
新建一个win32控制台应用程序,加入include /lib库到工程
配置属性->c/c++ ->与处理器 添加 HPDF_DLL
配置属性->链接器->输入 添加(debug:wtd.lib, wthttpd.lib,release:wt.lib, wthttp.lib)
配置属性->调试->命令参数 输入(--docroot . --http-address 0.0.0.0 --http-port 8080)
获取更多帮主请关注小程序

更多推荐
所有评论(0)