GUI-based C Compiler Problems.

I recently began teaching myself C with the help of a book called "C Programming for Absolute Beginners". In the book it has you download a Unix command prompt which is where it tells to you make all of the programs it teaches and the programs can only be ran in the Unix command prompt. I decided I didn't like this and downloaded a GUI based C compiler called [link=http://en.wikipedia.org/wiki/Pelles_C]Pelles C[/link]. Then I tried to run an exact copy of one of the many programs the book has and it comes up with random errors that make no sense, and this doesn't happen at all while using the command prompt. Now, I realize Pelles C is short of meant for pocket PCs, so maybe this is my fault, but I'm almost certain that I saw somewhere that it does basic windows 2000 programs as well.
[b]
EDIT:[/b] I also wanted to add that the error it usually comes up with is "POLINK: error: Unresolved external symbol '_WinMain'"

Comments

  • I recommend using Microsoft Visual C++ Express Edition (Its free to download, and a very good IDE package)

    That error is referring to WinMain, which is a required Windows application entry routine. This would be resolved by building the project not as a Win32 application.

    You can also just define it to fix that error:
    [code]
    #include

    int WINAPI WinMain (HINSTANCE,HINSTANCE,LPSTR,int) {

    // This is equivalent to your _main routine. This is the
    // entry point of your application. Dont worry if you dont know
    // what WINAPI, HINSTANCE, or LPSTR is, as that is not standard C,
    // but part of the Win32 API.

    return 0;
    }
    [/code]

    I recommend just using VSC++ Express Edition either way, though.
    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
  • : I recommend using Microsoft Visual C++ Express Edition (Its free to
    : download, and a very good IDE package)
    :
    : That error is referring to WinMain, which is a required Windows
    : application entry routine. This would be resolved by building the
    : project not as a Win32 application.
    :
    : You can also just define it to fix that error:
    : [code]:
    : #include
    :
    : int WINAPI WinMain (HINSTANCE,HINSTANCE,LPSTR,int) {
    :
    : // This is equivalent to your _main routine. This is the
    : // entry point of your application. Dont worry if you dont know
    : // what WINAPI, HINSTANCE, or LPSTR is, as that is not standard C,
    : // but part of the Win32 API.
    :
    : return 0;
    : }
    : [/code]:
    :
    : I recommend just using VSC++ Express Edition either way, though.
    : [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS
    : Operating
    : System[rightbr][leftbr][link=http://www.brokenthorn.com]Website ::
    : OS Development Series[rightbr][/link][/size]
    :
    Thanks very much. I was thinking of buying a compiler instead of using some crapy freeware one. I just thought I'd use Pelles in the meantime. But if VSC++ isn't too much money then maybe I'll get that.
  • : : I recommend using Microsoft Visual C++ Express Edition (Its free to
    : : download, and a very good IDE package)
    : :
    : : That error is referring to WinMain, which is a required Windows
    : : application entry routine. This would be resolved by building the
    : : project not as a Win32 application.
    : :
    : : You can also just define it to fix that error:
    : : [code]: :
    : : #include
    : :
    : : int WINAPI WinMain (HINSTANCE,HINSTANCE,LPSTR,int) {
    : :
    : : // This is equivalent to your _main routine. This is the
    : : // entry point of your application. Dont worry if you dont know
    : : // what WINAPI, HINSTANCE, or LPSTR is, as that is not standard C,
    : : // but part of the Win32 API.
    : :
    : : return 0;
    : : }
    : : [/code]: :
    : :
    : : I recommend just using VSC++ Express Edition either way, though.
    : : [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS
    : : Operating
    : : System[rightbr][leftbr][link=http://www.brokenthorn.com]Website ::
    : : OS Development Series[rightbr][/link][/size]
    : :
    : Thanks very much. I was thinking of buying a compiler instead of
    : using some crapy freeware one. I just thought I'd use Pelles in the
    : meantime. But if VSC++ isn't too much money then maybe I'll get that.
    :
    [color=Blue]Get it here:
    [link=http://www.microsoft.com/express/download/]VC++ 2008[/link]
    it is free, but you need to download an API package - it is big.[/color]
  • Borland also has a free version of their RAD tool. And there is also Dev C++ which uses gcc. Borland, MS and gcc are by far the most well-known PC compilers and are all good ones.
  • : [color=Blue]Get it here:
    : [link=http://www.microsoft.com/express/download/]VC++ 2008[/link]
    : it is free, but you need to download an API package - it is
    : big.[/color]

    I just downloaded the OpenGL SDK and DirectX 9 SDK. Shouldn't those have this API package I need?
  • : : [color=Blue]Get it here:
    : : [link=http://www.microsoft.com/express/download/]VC++ 2008[/link]
    : : it is free, but you need to download an API package - it is
    : : big.[/color]
    :
    : I just downloaded the OpenGL SDK and DirectX 9 SDK. Shouldn't those
    : have this API package I need?
    :

    I know the 2005 version does NOT come with the Win32 SDK. I assume the same is for the 2008 version.

    : Thanks very much. I was thinking of buying a compiler instead of using
    : some crapy freeware one.

    Also, this compiler IDE is surprisingly powerful compared to most others available. So, I would not brush it off quickly ;)
    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories