Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - C 及 C++ 编程 » 应用程序开发 » 开发用于 Palm OS 的 UltraLite 应用程序

 

在 CodeWarrior 中创建 UltraLite 项目

♦  在 CodeWarrior 中创建 UltraLite 项目
  1. 启动 CodeWarrior。

  2. 创建一个新项目:

    1. 从 [CodeWarrior] 菜单选择 [File] » [New]。

    2. 单击 [Projects] 选项卡。

    3. 选择 [Palm OS Application Stationery]。

    4. 选择项目的名称和位置,然后单击 [OK]。

  3. 选择 UltraLite 模板。

    UltraLite 插件将以下选项添加到模板列表中:

    • Palm OS UltraLite C++ App
    • Palm OS UltraLite ESQL App

    选择要使用的开发模型,然后单击 [OK] 创建项目。

    该模板是嵌入式 SQL 的标准 C 模板,同时也是 C++ 的标准 C++ 模板。

  4. 如果要使用嵌入式 SQL,请在 [UltraLite Preprocessor Panel] 上为项目配置相关设置。如果要使用 C++,将忽略这些设置。

    1. 在项目窗口 (.mcp) 中,单击工具栏上的 [Settings] 图标。

    2. 在左窗格的树中,选择 [Target] » [UltraLite Preprocessor]。输入项目的设置。

预处理

构建嵌入式 SQL 项目时,UltraLite 插件调用 sqlpp.sqc 文件预处理为 .c/.cpp 文件,并且还会将 ESQL 语句转换为 UltraLite 函数调用。

当您在 CodeWarrior 环境中构建 UltraLite 嵌入式 SQL 或 C++ 应用程序时,该插件不会将访问路径添加到 install-dir\SDK\Includeinstall-dir\UltraLite\Palm\68k\lib\cw\ 以及 UltraLite 库的 ulrt.libulbase.lib 中。该插件只会将运行 SQL 预处理器时所生成的文件添加到 UltraLite 嵌入式 SQL 应用程序的 CodeWarrior 项目中。