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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:06:44+00:00 2026-05-24T18:06:44+00:00

It seems like my two files, userinterface.h #ifndef USERINTERFACE_H #define USERINTERFACE_H #include <string> #include

  • 0

It seems like my two files, userinterface.h

#ifndef USERINTERFACE_H
#define USERINTERFACE_H

#include <string>
#include "vocabcollection.h"

namespace user_interface
{
//Finds a file
//
//Returns when user selects a file
std::string findFile();

//more comments followed by functions
}

#endif

and userinterface.cpp,

#include "userinterface.h"
using namespace std;
using namespace user_interface;

string findFile()
{
    return "./";
}

//more placeholder implementations of such functions; void functions have nothing within
//the brackets

are giving me this slew of errors from the linker:

Undefined symbols for architecture x86_64:
make: Leaving directory `longdirectorypath'
  "user_interface::showTestResults(int, int)", referenced from:
      vocabCollection::test()      in vocabcollection.o
  "user_interface::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)", referenced from:
      addNewCollection()     in mainlogic.o
      loadNewCollection()     in mainlogic.o
  "user_interface::findFile()", referenced from:
      loadNewCollection()     in mainlogic.o
  "user_interface::displayMainMenu(std::vector<vocabCollection, std::allocator<vocabCollection> >)", referenced from:
      mainlogic()    in mainlogic.o
  "user_interface::getUserAction()", referenced from:
      mainlogic()    in mainlogic.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [cheapassVocab.app/Contents/MacOS/cheapassVocab] Error 1
The process "/usr/bin/make" exited with code 2.
Error while building project cheapassVocab (target: Desktop)
When executing build step 'Make'

What’s happening 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-24T18:06:44+00:00Added an answer on May 24, 2026 at 6:06 pm

    In the header file, you declare the function findFile in the namespace user_interface. In the cpp file the free function findFile is defined. Yes, you are using namespace user_interface, but the compiler doesn’t know that the findFile defined there belongs to namespace user_interface. The result of all this is that you’ve declared user_interface::findFile and defined ::findFile. When you call user_interface::findFile, the linker cannot find it, since there’s only the free function findFile.

    Easily solved – cpp file:

    #include "userinterface.h"
    using namespace std;
    
    namespace user_interface
    {
        string findFile()
        {
            return "./";
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just learning about computer vision and C#. It seems like two prominent
For example, if I have two files: file1: This is file 1 and file2:
Seems like a simple enough question but I can't seem to find the answer.
Seems like a simple problem: I have an SVN repo inside our firewall. I
Seems like the subtraction is triggering some kind of issue and the resulting value
Seems like as really simple thing to do, but I just can't track it
Seems like every C# static analyzer wants to complain when it sees a public
Seems like cuke doesn't show the full error message (at least when problem occurs
Seems like a standard approach for an ioc when given a scenario like (C#
Seems like this should be obvious, but how do I send arrow key presses

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.