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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:50:33+00:00 2026-06-05T08:50:33+00:00

I have a class ABC in C++ .h class file. .h file #ifndef ABC_H_

  • 0

I have a class ABC in C++ .h class file.

.h file

#ifndef ABC_H_
#define ABC_H_

class ABC
{
  public:
    int x;
    int y;
};
#endif

.cpp file

//----- Empty  -----------

Main program .cpp

#include <iostream>
#include "ABC.h"
using namespace std;
    int main() {
      ABC a1;
      a1.x=5; a1.y=2;
      cout<<a1.x;
      // ...
    }

Error during compiling in Eclipse:

symbols not found for architecture x86_64

ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [CPPProgram] Error 1

All the other hello world programs etc. compile and run fine. I remember facing this error coming when I did the definition and implementation in separate files while using templates (and it went away when I implemented the definition and the implementation in same file)

I am not sure about what’s wrong here. Any suggestions?

  • 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-05T08:50:35+00:00Added an answer on June 5, 2026 at 8:50 am

    In the code you posted, you are missing a semi-colon:

    class ABC
    {
    public:
    int x;
    int y;
    };
     ^
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code snippet: class ABC{ public: int a; void print(){cout<<hello<<endl;} }; int
I have class Fred { public: void inspect() const {}; void modify(){}; }; int
public class MyClass { ClassABC abc = new ClassABC(); } I just have a
import java.io.*; public class Demo{ public static void main(String[] args){ File f = new
I have some code like this inside a file script.php : class ABC {
Let's say I have a structure -bin/com/abc/A.class -src/com/abc/A.java -config/info.txt How to address the file
I have user defined jar file which has .class files Ex: abc.jar. I want
In Abc.hpp file the following information is defined: class Abc: public A { enum
So let's assume I have a class named ABC that will have a list
I have a dll called Test.dll in which I have a class called ABC

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.