Undefined reference to WinMain@16 Problem - help

0 Mohammed Abdelsalam · May 10, 2015
Main.CPP
_______________________________

#include
#include "ClassMoh.h"

using namespace std;

int main()
{
    ClassMoh mo;
    return 0;
}
=====================================================
ClassMoh.h
___________

#ifndef CLASSMOH_H
#define CLASSMOH_H


class ClassMoh
{
    public:
        ClassMoh();

};

#endif // CLASSMOH_H

=============================================================================

ClassMoh.CPP
_______________

#include "ClassMoh.h"
#include


using namespace std;

ClassMoh::ClassMoh()
{
    cout
above is the codes of my program i follow everything like in the video exactly but still have this error i cannot get pass it 

can any one help ?

||=== Build: Debug in MyProj (compiler: GNU GCC Compiler) ===|
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'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

Post a Reply

Replies

Oldest  Newest  Rating
0 Mohammed Abdelsalam · May 11, 2015
at first it was undefined refrence to ClassMoh::ClassMoh() after that started to be the error you see above 

i just uninstalled it all and installed again codeblocks and it worked fine 

thanks 
0 c student · May 11, 2015
@Krootushas Gesu The edit button is right-justified on the line for the title text.
  • 1

C++

107,021 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator