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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:00:50+00:00 2026-05-19T10:00:50+00:00

I have to do one project and I was given dll and a header

  • 0

I have to do one project and I was given dll and a header file with implemented functions needed for the project. I was told just to add the header file to the project but this way i get unresolve externals error if i try to use functions referenced in header. So what needs to be done to make everything work? Visual Studio 2010.
Here are the files i have: http://www.ipix.lt/images/33871682.png
And this is header file:

#ifndef __BIM482_RADAR__
#define __BIM482_RADAR__

int BIM482OpenRadar();
int BIM482AddPlane(double x, double y);
int BIM482SetPlaneColor(int planeidx, int coloridx);
int BIM482SetPlanePos(int planeidx, double x, double y);
void BIM482UpdateRadar();

#endif // __BIM482_RADAR__

I need to initiate gui with OpenRadar and pass information with those functions. How to start this thing?

  • 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-19T10:00:51+00:00Added an answer on May 19, 2026 at 10:00 am

    You don’t have a .lib-file to link against.

    Maybe this can help you

    http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/

    or this:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;131313

    or this:

    http://www.asawicki.info/news_1420_generating_lib_file_for_dll_library.html

    when you have generated the lib-file ,you must use __declspec(dllimport) on yuor functions in the header file.

    An alternative to all of the above is to use LoadLibrary(…) in your source and write wrapper function for those function in the dll and call those dll funcions via GetProcAddress(…).

    struct
    {
       HMODULE hDll;
    
       int   (*BIM482OpenRadar)     (); 
       int   (*BIM482AddPlane)      (double x, double y); 
       int   (*BIM482SetPlaneColor) (int planeidx, int coloridx); 
       int   (*BIM482SetPlanePos)   (int planeidx, double x, double y); 
       void  (*BIM482UpdateRadar)   (); 
    } dll_funcs = {0};
    
    bool ExitRadar( LPCTSTR szDllPath )
    {
       if (dll_funcs.hDll)
          FreeLibrary( dll_funcs.hDll );
    
       return true;
    }
    
    bool InitRadar( LPCTSTR szDllPath )
    {
       if (dll_funcs.hDll)
          return true;
       dll_funcs.hDll = LoadLibrary( szDllPath );
       if (!dll_funcs.hDll)
          return false;
    
       dll_funcs.BIM482OpenRadar     = (int(*)())GetProcAddress( dll_funcs.hDll ,("BIM482OpenRadar") );
       dll_funcs.BIM482AddPlane      = (int(*)(double,double))GetProcAddress( dll_funcs.hDll ,("BIM482AddPlane") );
       dll_funcs.BIM482SetPlaneColor = (int(*)(int,int))GetProcAddress( dll_funcs.hDll ,("BIM482SetPlaneColor") );
       dll_funcs.BIM482SetPlanePos   = (int(*)(int,double,double))GetProcAddress( dll_funcs.hDll ,("BIM482SetPlanePos") );
       dll_funcs.BIM482UpdateRadar   = (void(*)())GetProcAddress( dll_funcs.hDll ,("BIM482UpdateRadar") ); 
       return true;
    }
    
    int   BIM482OpenRadar     () 
    { return (*dll_funcs.BIM482OpenRadar)(); }; 
    
    int   BIM482AddPlane      (double x, double y)
    { return (*dll_funcs.BIM482AddPlane)( x ,y ); }
    
    int   BIM482SetPlaneColor (int planeidx, int coloridx )
    { return (*dll_funcs.BIM482SetPlaneColor)( planeidx ,coloridx ); }
    
    int   BIM482SetPlanePos   (int planeidx, double x, double y) 
    { return (*dll_funcs.BIM482SetPlanePos)( planeidx ,x ,y ); }
    
    void  BIM482UpdateRadar   ()
    { return (*dll_funcs.BIM482UpdateRadar)(); }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im sure this will be a simple one but have a project that started
Underneath one Project in TFS we have multiple products. This is because for us,
So for this one project, we have a bunch of queries that are executed
I'm building an ASP.Net MVC website. Rather than have everything in one project, I've
When I have one app.config in my main project I always have to duplicate
I have a handful of projects that all use one project for the data
I have a solution with many projects. One project contain few custom components. One
I have a solution that contains two projects. One project is an ASP.NET Web
One long term project I have is working through all the exercises of SICP.
I have Midas project that uses a TDataSetProvider in one of RemoteDataModules in the

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.