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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:31:01+00:00 2026-06-10T20:31:01+00:00

I receive the following error: 1>main.obj : error LNK2019: unresolved external symbol void __cdecl

  • 0

I receive the following error:

1>main.obj : error LNK2019: unresolved external symbol “void __cdecl
setup(void)” (?setup@@YAXXZ) referenced in function _main 1>main.obj :
error LNK2019: unresolved external symbol “void __cdecl display(void)”
(?display@@YAXXZ) referenced in function _main
1>C:\code\Project1\Debug\Project1.exe : fatal error LNK1120: 2
unresolved externals

How do i resolve this?

Here is the main class, where the functions are used:

#include "interface.h"
using namespace std;

int main(){
    setup();
    display();
    system("pause");
    return 0;
}

Here is interface.cpp

#include <iostream>
#include <string>
#include "interface.h"
using namespace std;
class ui{
    void setup(){
        options[0][0]="Hello";
        options[1][0]="Hello";
        options[2][0]="Hello";
        options[3][0]="Hello";
        options[4][0]="Hello";
        options[5][0]="Hello";
        options[6][0]="Hello";
        options[7][0]="Hello";
        options[8][0]="Hello";
        options[9][0]="Hello";
    }
    void changeOption(int whatOption, string whatText,
                  string prop1, string prop2, string prop3, string prop4, string prop5){
        options[whatOption][0]=whatText;
        options[whatOption][1]=prop1;
        options[whatOption][2]=prop2;
        options[whatOption][3]=prop3;
        options[whatOption][4]=prop4;
        options[whatOption][5]=prop5;
    }
    void display(){
        for(int x=0;x<9;x++){
            cout<<options[x][0]<<endl;
        }
    }
};

and here is interface.h

#include <string>
//#include <iostream>
using namespace std;
#ifndef INTERFACE_H_INCLUDED
#define INTERFACE_H_INCLUDED
    void setup();
    extern string options[10][6];
    void changeOption(int whatOption, string whatText, string prop1, string prop2, string prop3, string prop4, string prop5);
    void display();
#endif INTERFACE_H
  • 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-10T20:31:03+00:00Added an answer on June 10, 2026 at 8:31 pm

    You declare these as global functions.

    However, your implementation defines them inside of class ui{.

    You can remove the class ui{ and matching closing parenthesis and it should work correctly.

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

Sidebar

Related Questions

I receive the error below when running the following function. The catch says the
I receive the following error in Microsoft SQL Server Report Builder Error While generating
I receive the following error when trying to run my ASP.NET MVC application: The
i receive the following error when trying to implement auto-complete based on edismax type.
I receive the following error when running a new compass project in OSX 10.7.3.
Question: I receive the following error for the code below, does anyone know why?
In my application I receive the following error: The context cannot be used while
Using HttpClient , I receive the following error when attempting to communicate over HTTPS:
When attempting to do an EntitySave(publications,arguments); .. I receive the following error. ids for
whenever I compile my code, I receive the following errors: error: constructor Player 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.