Hi, i am super noob in c++ programming
i actually don't have a programming question yet, but a lot of compiler problems and it is just one of them.
I installed codeblock 13.12 mingw32 in window 8,
it runs ordinary code like "hello world" very well.
But when i create class, it doesn't run anything.
thank you all
This is the Build Log
-------------- Build: Debug in classing (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -fexceptions -g -I -c D:\class\classing\class1234.cpp -o obj\Debug\class1234.o
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../libmingw32.a(main.o):main.c:(.text.startup+0xa7): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I have search a lot of thread but those solution dont fit my problems.
i guess there is something doesn't link to my header file, but have no idea how to link it.
i hope there is any clue that i can follow to solve my problems.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#ifndef CLASS1234_H
#define CLASS1234_H
class class1234
{
public:
class1234();
virtual ~class1234();
protected:
private:
};
#endif // CLASS1234_H
#include <iostream>
#include "class1234.h"
using namespace std;
class1234::class1234()
{
//ctor
}
class1234::~class1234()
{
//dtor
}
#include <iostream>
#include "class1234.h"
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
|