Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:56:31+00:00 2026-06-07T18:56:31+00:00

We are developing a DLL for both 32-bit and 64-bit targets. This DLL references

  • 0

We are developing a DLL for both 32-bit and 64-bit targets. This DLL references a library in WinDDK. Therefore, for our 32-bit target DLL, we must reference the 32-bit DDK library and for the 64-bit target DLL, we must reference the 64-bit DDK library.

What is the best way to do that? Right now, in our code we have:

#pragma comment (lib , "c:\winddk\i386\...");

but for an x64 target, that path is incorrect. We do not want to modify these paths manually in our code as that is very error prone. If it matters, we’re on VS2010.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:56:33+00:00Added an answer on June 7, 2026 at 6:56 pm

    You could use #ifdef:

    #ifdef _WIN64
        #pragma comment (lib , "c:\winddk\x64\...")
    #else
        #pragma comment (lib , "c:\winddk\i386\...")
    #endif
    

    _WIN64 is a Microsoft-specific predefined macro.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing application using VC++ 6. I have a 3rd party DLL. This library
I am developing a simple class library project, which will give me a dll.
I am developing a shared library(.so) and dll. I have a global variable which
Suppose you are developing a library with classes to be exported through a DLL
I am developing a COM dll library, and I have a little vb.net (vs
I'm developing a DLL that uses WPF classes to make image manipulation. It works
I´m developing a software in C# that uses static functions from a C++ .dll
Currently developing an application using the newest version of symfony, obtained through PEAR. This
While developing a firefox extension, I create a wizard window from overlay.js using: this.wizard
I'm developing an AutoCad plugin (MFC dll), I'm using Visual Studio 2010 and C++.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.