failing to call class from main function

I am trying to call a class that i created from the main function of my program in code blocks.
main.cpp
1
2
3
4
5
6
7
  #include <iostream>
#include "display.h"
int main()
{
     Display d;
    return 0;
}

display.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef DISPLAY_H
#define DISPLAY_H
class Display
{
    public:
        Display();
        virtual ~Display();

    protected:
    private:
    Display(const Display& other){}
        Display& operator=(const Display& other){}
};

#endif // DISPLAY_H 

display.cpp
1
2
3
4
5
6
7
8
9
10
11
#include "display.h"

Display::Display()
{
    //ctor
}

Display::~Display()
{
    //dtor
}

1
2
3
4
5
6
7
8
build messages:

||=== Build: Debug in igotthis (compiler: GNU GCC Compiler) ===|
/home/ron/Desktop-Development/igotthis/display.h||In member function ‘Display& Display::operator=(const Display&)’:|
/home/ron/Desktop-Development/igotthis/display.h|14|warning: no return statement in function returning non-void [-Wreturn-type]|
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o||In function `_start':|
(.text+0x20)||undefined reference to `main'|
||=== Build failed: 1 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|


i have added the linked libraries GL, SDL2, and GLEW to build options. may you help me figure out whats going on here.
It doesn't seem to find the main function. Are you only compiling display.cpp? Make sure you have added both main.cpp and display.cpp to the same project.
I press the build icon when I have the main.cpp file opened. Not sure if that is how I add it to the project, I have also tried to right click on project name and clicking 'Add files recursively' with no success. If its a problem caused by my paths not working, how would I fix it? Sorry I am all over the place I am new to c++ and do not really know where to start to figure this out.
Topic archived. No new replies allowed.