I've just moved all my C++ work from my University computer to my laptop and installed Cygnus. I've been trying to debug what part of my code is giving me this error but it seems even if I comment out most of my code I still get this error. I'm guessing this is an issue with the compiler but why is it happening and how do I fix it? If you have any other recommendations please let me know and let me know why.
I've just started C++ programming from yesterday so I'm not sure if this is a problem with an obvious solution so please bear with me.
menumanager.cpp:
#include <iostream>
#include "menu.h"
int main() {
MainMenu manager;
return 0;
}
menu.h:
#ifndef MENU_H
#define MENU_H
class MainMenu {
private:
public:
MainMenu();
};
#endif
menu.cpp:
#include <iostream>
#include "menu.h"
using std::cout;
using std::cin;
using std::endl;
MainMenu::MainMenu() {
cout << "Menu Constructer says hello" << endl;
}
error:
C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\..\lib\gcc-lib\i586- cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib/libcygwin.a(libcmain.o): In function `main':
/home/noer/src/b20/comp-tools/devo/winsup/libcmain.cc:38: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
[Finished in 0.2s with exit code 1]
If I need to make modifications to my compiler please provide a step by step process on how I can fix it as I am a beginner.