导入 msado15.dll 后未生成 msado15.tlh [英] msado15.tlh not generated after importing msado15.dll

查看:43
本文介绍了导入 msado15.dll 后未生成 msado15.tlh的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 /MP(多进程构建) 选项来启用多进程编译,但是,它与#import 冲突,所以我正在尝试 替换 Visual C++ 中的 #import :

I'm trying to use /MP (Build with Multiple Processes) option to enable multi-process compilation, however, it conflicts with #import, so I'm trying the workaround proposed in Replacement for #import in Visual C++ :

对于在谷歌中遇到这个问题的其他人:

For anyone else stumbling over this in google:

  1. 创建一个单独的静态库项目
  2. 设置足够的包含,以便您可以将#import 语句放入 lib 项目中
  3. 使您的主项目依赖于 lib 项目(以确保正确的构建顺序)
  4. 将 lib 项目的临时构建文件夹添加到包含路径中主要项目
  5. #include 生成的 .tlh 文件,您在其中执行 #import
  6. 启用/MP 开关并失去咖啡休息时间...
  1. create a separate static lib project
  2. set up enough includes so you can put the #import statement in the lib project
  3. make your main project dependent on the lib project (to ensure correct build order)
  4. add the lib project's temporary build folder to the include path for the main project
  5. #include the generated .tlh files where you were doing the #import
  6. enable the /MP switch and lose the coffee break time...

我搞砸了这些步骤,但是没有生成msado15.tlh".

I foolowed the steps, however, "msado15.tlh" was not generated.

这就是我所做的:

  1. 创建一个静态库项目AdoImport
  2. AdoImport项目中添加一个头文件AddImport.h,只包含一行:#import "C:/Program Files/Common Files/System/ado/msado15.dll" rename("EOF", "adoEOF") rename("BOF", "adoBOF")
  3. 编译
  1. create a static library project AdoImport
  2. Add a header file AddImport.h in the AdoImport project, contains only one line: #import "C:/Program Files/Common Files/System/ado/msado15.dll" rename("EOF", "adoEOF") rename("BOF", "adoBOF")
  3. compile

我希望在 AdoImport proejct 的 Debug 文件夹中生成一个 msado15.tlh,但没有找到.编译报告成功,只生成AdoImport.lib.

I'm expecting a msado15.tlh will be generated in AdoImport proejct's Debug folder, but it's not found. The compilation reports success and only generated AdoImport.lib.

如何生成 msado15.tlh 以便我的主项目可以包含它?

How shall I make msado15.tlh generated so my main project could include it?

推荐答案

以防万一有人被 google 发现了,我是如何解决的 --

just in case anyone hit this by google, how i solved it --

放一行 #import "C:/Program Files/Common Files/System/ado/msado15.dll" rename("EOF", "adoEOF") rename("BOF", "adoBOF")AdoImport 项目的 stdafx.h 中,以便它始终被编译.

put the line #import "C:/Program Files/Common Files/System/ado/msado15.dll" rename("EOF", "adoEOF") rename("BOF", "adoBOF") in the stdafx.h of the AdoImport project so that it alway get compiled.

AdoImport 项目的中间目录"(在项目属性 -> 配置属性 -> 常规下)应包含在主项目的路径中.

AdoImport project's "intermediate Directory" (under Project Property -> Configuration Properties -> General) shall be included in the main project's paths.

这篇关于导入 msado15.dll 后未生成 msado15.tlh的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆