athos athos - 3 years ago 341
C++ Question

msado15.tlh not generated after importing msado15.dll

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. 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...

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

Here's what I do:

  1. create a static library project

  2. Add a header file
    in the
    project, contains only one line:
    #import "C:/Program Files/Common Files/System/ado/msado15.dll" rename("EOF", "adoEOF") rename("BOF", "adoBOF")

  3. compile

I'm expecting a
will be generated in
folder, but it's not found. The compilation reports success and only generated

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

Answer Source

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

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 project's "intermediate Directory" (under Project Property -> Configuration Properties -> General) shall be included in the main project's paths.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download