[Setup] FLTK - A simple C++ GUI Library

本文档详细介绍了如何在Microsoft Visual C++ Express Edition环境下安装并配置FLTK库的具体步骤,包括安装必要的软件、更新环境变量及配置文件等。
部署运行你感兴趣的模型镜像

1. Install Windows SDK (v6.0A);

2. Install Visual Studio (v2008 professional);

3. Download latest stable release of FLTK from http://www.fltk.org/index.php (v1.1.9);

4. Extract the fltk to C:/FLTK folder;

5. Open C:/FLTK/vs2005/fltk.sln; As I use VS2008 to open vs2005 solution file, it will promote an upgrade dialogue. Just follow it to upgrade.

6. After that, Add a new environment variable to the system:

FLTKDIR - C:/FLTK

7. Go to Tools > Options > Projects and Solutions > VC++ Directories and under "Show directories for:" select "Include files". Select the top directory listed and click the folder icon to insert a new line  at the top; enter C:/FLTK. Now select "Library files", select the top directory listed and click the folder icon to insert a new line at the top; enter C:/FLTK/lib.

The Manual I referenced is:

FLTK for Microsoft Visual C++ Express Edition on Windows XP

10/17/2007

0. First install the latest version of Windows Installer by going to

http://www.microsoft.com/downloads/details.aspx?familyid=889482FC-5F56-4A38-B838-DE776FD4138C&displaylang=en and clicking Continue, and so on. Then install the update at http://www.microsoft.com/downloads/details.aspx?FamilyID=7a81b0cd-a0b9-497e-8a89-404327772e5a&DisplayLang=en.

1. Then install Microsoft Visual C++ Express Edition from http://msdn2.microsoft.com/en-us/express/aa975050.aspx, steps 1-4. (Note: Do not click Visual Studio 2008.) You should not have to uninstall other

Visual Studios, SQLs, etc. first unless installing VC++ Express fails. In

that case, go to http://msdn2.microsoft.com/en-us/vstudio/aa718405.aspx for instructions on uninstalling conflicting versions of SQL, Visual Studio, or

.NET and then try the install again.

2. Next install the Platform SDK--go to www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en and at the bottom of the page click PSDK-x86.exe to download; run this file. Now do the following substeps:

Substep 2.3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.

Add these paths to the appropriate subsection. (To add a directory select the top directory listed and click the folder icon to insert a new line at the top; type the specified path and press Enter.)

  • Executable files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin
  • Include files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Include
  • Library files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Lib

Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.Express.config file located in the /vc/vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%/Local Settings/Application Data/Microsoft/VCExpress/8.0" if it exists before restarting Visual C++ Express Edition.

Substep 2.4: Update the corewin_express.vsprops file.

One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:/Program Files/Microsoft Visual Studio 8/VC/VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib"

  to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Substep 2.5: Generate and build a Win32 application to test your paths.

In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder “%ProgramFiles%/Microsoft Visual Studio 8/VC/VCWizards/AppWiz/Generic/Application/html/1033/".

In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:

// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;

Save and close the file and open Visual C++ Express.

From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.

As a final step, test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.

3. Run Windows Update and install .NET Framework 2.0 if it is listed,

plus any other updates your computer needs; reboot. Run Windows Update

and install any other updates your computer needs; reboot; repeat as

needed. Follow the instructions in Appendix G2 to enter a HelloWorld.cpp

program and make sure it runs. Then copy http://courses.cs.tamu.edu/daugher/cpsc121/06fall/std_lib_facilities.h as directed in Appendix G2, add the line

#include "../../std_lib_facilities.h"

to your program, and rebuild the solution to make sure it still runs.

4. Go to http://fltk.org and download the latest stable release,

currently fltk-1.1.7-source.zip. Create a new folder C:/FLTK and unzip

the downloaded archive to C:/FLTK.

5. Locate C:/FLTK/fltk-1.1.7/vc2005/fltk.sln and double-click on it.

This will open VC++ Express.

6. Go to Tools > Options > Projects and Solutions > VC++ Directories

and under "Show directories for:" select "Include files". Select the

top directory listed and click the folder icon to insert a new line

at the top; enter C:/FLTK/fltk-1.1.7. Now select "Library files",

select the top directory listed and click the folder icon to insert a

new line at the top; enter C:/FLTK/fltk-1.1.7/lib.

7. Build the solution (F7) and start it (CONTROL-F5). If you are

successful, CubeViewd should execute. Now reward yourself and play

with the sliders and rollers (move, rotate, pan, zoom, etc.) for a

while--you deserve it! :-)

8. Open each of the following files from the Code section of the

course web page, one at a time, and click File > Save As to save each

file to C:/Documents and Settings/ /My Documents/

Visual Studio 2005/Projects (where you put std_lib_facilities.h in

step 3):

fltk.h

Graph.h

Graph.cpp

GUI.cpp

GUI.h

Point.h

Simple_window.h

Window.h

Window.cpp

Be sure to save as text files, not HTML or anything else.

9. Create a new project named sample_main3 (not sample_main) and add

a new item sample_main3.cpp (not sample_main.cpp) from the Code

section of the course web page. Add existing items Graph.cpp,

GUI.cpp, and Window.cpp from the directory in step 8. Right-click on

the project name and select Properties. Locate Configuration

Properties > Linker > Input > Additional Dependencies and add the

following:

fltkd.lib

fltkjpegd.lib

fltkimagesd.lib

wsock32.lib

comctl32.lib (that's a lower-case "L" before the "32")

Under Ignore Specific Library, add libcd.lib. Locate Configuration

Properties > C/C++ > General > Additional Include Directories and add

C:/FLTK. Build the solution (F7) and start it (CONTROL-F5). If you

are successful, you should get a new window titled "two lines" with

two lines on it like axes or a big plus sign, plus a button labelled

"Next" which closes the window. Major congratulations!

From this point on, create your FLTK programs the same way as

sample_main3.cpp. Better yet, make incremental changes to

sample_main3.cpp to transform it into the desired homework program.

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

### Google AI Editor Jules 简介 Google AI Editor Jules谷歌推出的一款基于人工智能技术的文本编辑工具,旨在帮助用户更高效地进行文档创作、校对和优化。它利用自然语言处理(NLP)技术,提供实时语法检查、风格改进建议以及内容生成支持[^1]。此外,Jules 还能够根据用户的写作风格提供建议,从而提升文档的专业性和可读性。 ### 功能概述 #### 1. 实时语法与拼写检查 Jules 提供了强大的实时语法和拼写检查功能,可以快速识别并修正常见的语言错误。这些功能不仅限于简单的拼写问题,还包括复杂的句子结构分析和语义理解[^2]。 #### 2. 写作风格优化 除了基本的语法修正外,Jules 还能分析文本的语气、复杂度和一致性,并给出具体的改进意见。例如,它可以帮助用户将过于正式的文本调整为更亲切的风格,或者反之[^3]。 #### 3. 内容生成与扩展 对于需要撰写较长文档的用户,Jules 可以根据提供的段落或主题自动生成相关内容。这种功能特别适用于撰写文章、报告或邮件等场景[^4]。 #### 4. 多语言支持 Jules 支持多种语言的文本编辑,包括但不限于英语、法语、西班牙语和中文。这使得全球范围内的用户都能从中受益[^5]。 ### 使用指南 #### 安装与配置 - 用户可以通过谷歌的应用商店下载并安装 Jules 编辑器。 - 首次启动时,用户需要登录其谷歌账户以同步个人偏好设置和历史记录[^6]。 #### 基本操作 - 打开 Jules 后,用户可以直接输入文本,工具会自动开始分析并提供建议。 - 在界面右侧或底部,用户可以看到详细的修改建议列表,点击即可应用更改[^7]。 #### 高级功能 - **个性化设置**:用户可以根据自己的需求调整 Jules 的敏感度,例如选择严格模式或宽松模式。 - **插件集成**:Jules 支持与其他生产力工具(如 Google Docs 和 Gmail)无缝集成,方便用户在不同平台间切换使用[^8]。 ```python # 示例代码:通过 API 调用 Jules 的内容生成功能 import google_ai_editor_jules as jules def generate_content(prompt): response = jules.generate(prompt) return response['text'] prompt = "请为一篇关于人工智能的文章生成开头段落" generated_text = generate_content(prompt) print(generated_text) ``` ### 注意事项 尽管 Jules 功能强大,但在某些情况下仍可能无法完全替代人类的判断力。因此,建议用户在使用过程中结合自身经验对生成的内容进行最终审核[^9]。
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值