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 4013962
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:26:14+00:00 2026-05-20T09:26:14+00:00

I create two projects in VC++ Express 2010, one is DLLTest, the other is

  • 0

I create two projects in VC++ Express 2010, one is DLLTest, the other is CODETest.

In DLLTest, declare and define a function func() as follows:

__declspec(dllexport) void  func() {...};

Build DLLTest project successfully, DLLTest.dll and DLLTest.lib files created.

In CODETest, i want to use the exported function as follows:

#include "DLLTest.h"
int main()
{
    ...
    func();
    ...
    return 0;
}

Error occurs when build CODETest project—>”unresolved external symbol “void __cdecl letterList(void)” , but when i add DLLTest.lib into directory of CODETest project, build process successfully.

I dont know why? Thanks for help.

  • 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-20T09:26:14+00:00Added an answer on May 20, 2026 at 9:26 am

    This seems all pretty unlikely, especially the part where “func” transformed into “letterList”. Nevertheless, you have to tell the linker to also link the import library of the DLL so that it can resolve identifiers that are imported from that DLL. The easiest way to do that in MSVC is:

    #include "DLLTest.h"
    #pragma comment(lib, "dlltest.lib")
    

    in CodeTest.cpp. The #pragma does the same thing as the linker’s Additional Dependencies setting.

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

Sidebar

Related Questions

I created a solution in Visual C# 2010 Express that contains two projects: one
Creating an ATL project in MSVC seems to create not one but two projects;
I have two different .Net projects, hosted on github. I would like to create
Some time back, I created two separate SharePoint projects in VS 2008; one using
i create two input text fields , one for title and another for permanent
How can I create two different lists for one model? In my case I
I am creating two tables in Visual Web Developer 2010 Express using the following
I have two projects, one of them is a Windows phone application and the
I'm creating Win32 application and I have two projects. The first one is a
Possible Duplicate: Is it possible to declare a partial class in two projects Say

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.