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

  • Home
  • SEARCH
  • 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 1017881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:46:23+00:00 2026-05-16T10:46:23+00:00

What is my main concern is , I am able to write a C++

  • 0

What is my main concern is , I am able to write a C++ dll using VC++ . Now the dll is present in the Debug folder.

How can I use my DLL in other C++ Console Application. How to add reference or link the DLL to the application.

Another point, While creating a DLL , The VC++ wizard gives me thre option:

  1. An Empty DLL project
  2. A Simple DLL project
  3. A DLL that Exports some Symbol

Now as per article from CP I have used the 3rd option. (Unable to follow as the dll was used by an MFC app, Some how little advanced at this point of time)

Do I need to always choose the third option? What are the the other two options mean?

  • 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-05-16T10:46:23+00:00Added an answer on May 16, 2026 at 10:46 am

    Not completely sure what you questions are but:

    It doesn’t really matter which option you use it is just a matter of what the wizard does for you; if you use the third option then the wizard creates a bit in your header file that looks like this:

    #ifdef TEST_EXPORTS
    #define TEST_API __declspec(dllexport)
    #else
    #define TEST_API __declspec(dllimport)
    #endif
    

    The way this works is that in the DLL project TEST_EXPORTS is defined in the compiler options so TEST_API evaluates to dllexport thus telling the linker to export these symbols. If you include this header in another project it defines TEST_API as dllimport which tells the compiler to link to it at run-time in the DLL. This #define method of exporting symbols is widely used and easy to read.

    In order to call a function/class inside the DLL you need to export the symbols one of two ways:
    a) using the __declspec(dllexport) [this seems the more convenient option in almost all cases ]OR
    b) using a .DEF file in your project

    Also wanted to mention that you need to include either the DLL project in your solution for the .exe file OR the .lib generated by the DLL compile.

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

Sidebar

Related Questions

The main web application of my company is crying out for a nifty set
My main JavaScript framework is jQuery , so I would like my unit test
function main() { Hello(); } function Hello() { // How do you find out
The main user-case is: Create the 2D floor plan See the 3D view of
Why main must be declared as if it has external linkage? Why it should
My main browsers (FF and Chrome) are both configured for a 12 pixel font.
The main jQuery method takes a second optional argument to provide context for the
My main experience is with C && C++, so I'd prefer to remain with
My main window has spawned a child window that's positioned on top to look
int main(void) { char tmp, arr[100]; int i, k; printf(Enter a string: ); scanf_s(%s,

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.