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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:39:27+00:00 2026-06-03T03:39:27+00:00

I am continuously getting that error, and it’s driving me crazy! Undefined symbols for

  • 0

I am continuously getting that error, and it’s driving me crazy!

Undefined symbols for architecture x86_64:
  "SSResourcesDepot::_sharedInstance", referenced from:
    SSResourcesDepot::sharedInstance() in SSResourcesDepot.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My code looks like:

#ifndef SolarSystem_SSResourcesDepot_h
#define SolarSystem_SSResourcesDepot_h
#include "SSResource.h"

/* SSResourcesDepot is implemented as a Singleton Depot that keeps track of all
 * requested Resource objects, and avoid loading them twice in memory. */
class SSResourcesDepot {

    SSResourcesDepot() {};
    SSResourcesDepot(SSResourcesDepot const&){};
    SSResourcesDepot& operator=(SSResourcesDepot const&){};

    static SSResourcesDepot* _sharedInstance;

    SSResource* _search(std::string resourceName);
    SSResource* _load(std::string resourceName);

public:
    static SSResourcesDepot* sharedInstance();
    SSResource* requestResource(std::string resourceName);

};

#endif

and:

#include <iostream>
#include "SSResourcesDepot.h"


#pragma mark Public methods
SSResourcesDepot* SSResourcesDepot::sharedInstance() {
    if (SSResourcesDepot::_sharedInstance == 0) {
        SSResourcesDepot::_sharedInstance = new SSResourcesDepot();
    }
    return SSResourcesDepot::_sharedInstance;
}

SSResource* SSResourcesDepot::requestResource(std::string resourceName) {
    SSResource *resource = this->_search(resourceName);
    if (resource == NULL) resource = this->_load(resourceName);
    return resource;
}


#pragma mark Private methods
SSResource* SSResourcesDepot::_search(std::string resourceName) {
    return NULL;
}

SSResource* SSResourcesDepot::_load(std::string resourceName) {
    return NULL;
}

It seems completely functional to me, but Apple-O-Matcher keeps complaining, and it doesn’t let me compile … :-S

Thanks in advance!

  • 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-03T03:39:29+00:00Added an answer on June 3, 2026 at 3:39 am

    You didn’t initialize your static member.

    Add

    SSResourcesDepot* SSResourcesDepot::_sharedInstance = NULL;
    

    to your implementation file.

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

Sidebar

Related Questions

I am writing a process that will run continuously, getting messages on a queue
I am continuously getting an Access Violation Error with a all my kernels which
I am continuously getting Error Code The ORA-01033: ORACLE initialization or shutdown in progress
While deploying a dwr web app, i'm continuously getting this error. I dont know
So I'm getting a ton of data continuously that's getting put into a processedData
Im just getting into MapViews on iOS, and want to show a car continuously
I want to continuously sample from my PC's audio line in using C# (then
I've tried a veriety of jQuery plugins recently and I keep getting this error
I have a service (with a wakelock) that must run continuously behind the scenes
I am making application in c#. I am getting data on 24097 port continuously

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.