NO

Author Topic: Warning #2203 / Pelles C not working at all  (Read 10096 times)

chris

  • Guest
Warning #2203 / Pelles C not working at all
« on: November 05, 2008, 04:02:13 PM »
Hello Everybody,


I'm new to Pelles C, but not new to C. Wanted to try it for making small
project's with Pelles C. I got a strange error:
-Compiling and Executing the Sample-Project "Hello" does work.

-If I copy the Code of the "Hello"-Project into a New File and ad it to
a new project, the following warning occurs:
...test.c(16): warning #2203: Function 'main' can't be __stdcall, changed to __cdecl.

If I try to execute it, the following error occurs:
POLINK: error: Unresolved external symbol '_WinMain'.
POLINK: fatal error: 1 unresolved external(s).

Does anybody know how to fix this error? I get another one:
If I Compile another bigger project, i get the same error and if i try anything now,
it says everytime:
(german) Fehler beim Schreiben in die Datei 'code.c' (Filename). (free translation) error by writing on File 'code.c'.
The process cannot access the file because it is being used by another process.

But there's no other (visible) process that uses this file.
I can't save the file nor close the Pelles C nor execute or compile it..Anyone knows something about that?

Thank you very much for your help.
Chris

JohnF

  • Guest
Re: Warning #2203 / Pelles C not working at all
« Reply #1 on: November 07, 2008, 10:55:16 AM »
Hello Everybody,

I'm new to Pelles C, but not new to C. Wanted to try it for making small
project's with Pelles C. I got a strange error:
-Compiling and Executing the Sample-Project "Hello" does work.

-If I copy the Code of the "Hello"-Project into a New File and ad it to
a new project, the following warning occurs:
...test.c(16): warning #2203: Function 'main' can't be __stdcall, changed to __cdecl.

If I try to execute it, the following error occurs:
POLINK: error: Unresolved external symbol '_WinMain'.
POLINK: fatal error: 1 unresolved external(s).

Does anybody know how to fix this error?

Thank you very much for your help.
Chris


You appear to be mixing up between a conlsole app and a windows app.

Make sure you are compiling for the right type of application. If your code includes a main() function it is a console app, if it includes a WinMain() function it is a windows app.

Look in 'Project options' and the Linker tab and then see the Subsystem type drop down box.

John