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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:12:14+00:00 2026-05-21T10:12:14+00:00

I get these three errors and they seem to make little sense to me.

  • 0

I get these three errors and they seem to make little sense to me. If i comment the UserInstruction1(P1, P2, P3); in the console app the errors go away. Both projects are /CLR projects.

error LNK2028: unresolved token (0A000930) "void __cdecl UserInstruction1(double *,wchar_t *,wchar_t *)" (?UserInstruction1@@$$FYAXPANPA_W1@Z) referenced in function "int __cdecl wmain(int,wchar_t * * const)" (?wmain@@$$HYAHHQAPA_W@Z)  

error LNK2019: unresolved external symbol "void __cdecl UserInstruction1(double *,wchar_t *,wchar_t *)" (?UserInstruction1@@$$FYAXPANPA_W1@Z) referenced in function "int __cdecl wmain(int,wchar_t * * const)" (?wmain@@$$HYAHHQAPA_W@Z)

error LNK1120: 2 unresolved externals   C:\Workspace\Company.Pins\Bank\Source\Debug\Company.Pins.Bank.Win32Console.exe

//Console App.
#include "stdafx.h"
#include "UInstruction.h"



int _tmain(int argc, _TCHAR* argv[])
{
    auto P2 = (TCHAR *)"3 Barrowstead";
    TCHAR* P3;
    double* P1;
    P1[0] = 13;

    UserInstruction1(P1, P2, P3);
    return 0;
}

—

//UInstruction.h
#ifndef __UINSTRUCTION_H__
#include "stdafx.h"
#include "UInstruction.h"
#include "common.h"

#include <iostream>
#include <stdio.h>
#define PRES_NOCOMMAND_FOUND 2000


#define DllExport  __declspec(dllexport)

void ReconcileUHParameter(const double* lpNumeric, TCHAR* lpAlpha1, TCHAR* lpAlpha2);
extern void UserInstruction1(double* lpNumeric,     TCHAR* lpAlpha1, TCHAR* lpAlpha2);

#endif

—

//UInstruction.cpp
#include "stdafx.h"
#include "UInstruction.h"
#include "common.h"
#using "Company.Pins.Bank.Decryption.dll"
#include <iostream>
#include <stdio.h>
using namespace std;
using namespace System;
using namespace System::Runtime::InteropServices;


CPReSInterfaceApp theApp;
extern void UserInstruction1(
                    double* lpNumeric, 
                    TCHAR* lpAlpha1, TCHAR* lpAlpha2)
{
//logic goes here       
}
  • 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-21T10:12:15+00:00Added an answer on May 21, 2026 at 10:12 am

    I assume here that all code resides in a single project (Company.Pins.Bank.Win32Console). If so you should move the <\iostream> and <\stdio.h> includes (and any other includes of headers that never/seldom change to stdafx.h:

    //stdafx.h
    
    #include <iostream>
    #include <stdio.h>
    
    
    //other headers that are widely used but never/seldom change...
    
    #define DllExport  __declspec(dllexport)
    #define DllImport  __declspec(dllimport)
    

    and

    //UInstruction.h
    
    #pragma once //you are in VS 2010...
    
    #include "common.h"
    
    //ommited code for brevity...
    void UserInstruction1(double* lpNumeric,     TCHAR* lpAlpha1, TCHAR* lpAlpha2);
    

    and

    //UInstruction.cpp
    #include "stdafx.h"
    #include "UInstruction.h"
    
    //ommitted code for brevity...
    
    void UserInstruction1( double* lpNumeric, 
                           TCHAR* lpAlpha1, TCHAR* lpAlpha2 )
    {
       //logic goes here
    }
    

    If UserInstruction1 resides in a Dll that is used by the Company.Pins.Bank.Win32Console project:

    Make sure you define in stdafx.h for the dll and console projects:

    #define DllExport  __declspec(dllexport)
    #define DllImport  __declspec(dllimport)
    

    Open the properties for the DLL project, go to “Configuration Properties” -> “C/C++” -> “Preprocessor” and add to “Preprocessor Definitions” a preprocessor symbol (if you don’t have one). I.e. I’ll call it MY_DLL. Don’t forget to define it in all configurations…

    Make sure you export the functions from the Dll

    //UInstruction.h
    
    #pragma once //you are in VS 2010...
    
    #ifdef MY_DLL
        #define MY_DLL_EXPORTS  DllExport
    #else
        #define MY_DLL_EXPORTS  DllImport
    #endif //MY_DLL
    
    #include "common.h"
    
    #define PRES_NOCOMMAND_FOUND 2000
    
    //ommited code for brevity...
    
    void MY_DLL_EXPORTS UserInstruction1(double* lpNumeric,     TCHAR* lpAlpha1, TCHAR* lpAlpha2);
    

    The cpp file for UInstruction remains the same as above…

    EDIT: For completness…

    //UInstruction.cpp
    #include "stdafx.h"
    #include "UInstruction.h"
    
    //ommitted code for brevity...
    
    //no extern needed...
    void UserInstruction1( double* lpNumeric, 
                           TCHAR* lpAlpha1, TCHAR* lpAlpha2 )
    {
       //logic goes here
    }
    

    Do not forget to add a reference to the Dll project to the Company.Pins.Bank.Win32Console project from the properties of the Company.Pins.Bank.Win32Console “Common Properties” -> “Framework and References”

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

Sidebar

Related Questions

There are many similar questions but they don't seem to make too much sense
and get meaningful results. Currently I am running these three queries: SELECT t.type,t.id,s.title FROM
This question has been asked many times before, but they all seem to relate
I can't seem to get a stream that Flex 3 want's to decompress. I've
I can't seem to figure out how to get my routes setup properly. In
I seem to have problem with jQuery bind() and unbind() functions. They seem to
When we try to create a view within a funcion we get ERROR: there
When debugging in Visual Studio 2008 I get the error There is no source
I get an exception with the message: There is an error in XML document.
while executing the following query, i get an error that there's an error in

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.