I'm having a problem getting a C++ file to build. I made the source as simple as possible to try and get rid of all possibilities but I'm still having a problem. When I go to build, the build log looks like:
Project : AI Program 1 - Slide Puzzle
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Kinger\My Documents\Code Blocks\AI\Slide Puzzle\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: SlideMain.cpp
Linking console executable: AI Project 1 - Slide Puzzle.exe
C:/Program Files/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 5 seconds)
0 errors, 0 warnings
It says there are no problems, but there is no executable file in the Slide Puzzle Directory. The .objs directory appears with the SlideMain.o file in it. Here is the source, as short as it is:
#include<iostream>
using namespace::std;
int Main()
{
cout<<"Hello World!";
}
I'm a little curious as to why it's looking for WinMain@16 at all, this is going to be a console program. Also, I opened a Win32 template and compiled that and it went together fine and made an Executable.