Pelles C forum

C language => Beginner questions => Topic started by: Zinefer on February 18, 2008, 02:48:07 AM

Title: Newbie Question
Post by: Zinefer on February 18, 2008, 02:48:07 AM
Hello, I am not exactly a newbie to programming itself, however I do not know C#...

I am trying to start out with a simple 'Hello World' application, however I keep getting this error:

Quote
Building hello.obj.
D:\Program Files\PellesC\Include\Win\winbase.h(2794): fatal error #1035: Could not find include file <kfuncs.h>.
*** Error code: 1 ***
Done.

... and here is my code:

Code: [Select]
#include <windows.h>

int WINAPI WinMain (HINStANCE hInstance, HINStANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) {

MessageBox (Null, TEXT ("Hello World!"), TEXT ("Hello!"), MB_OK);

return 0;
}

If you could please let me know if i did anything wrong I would appreciate it. Thanks
Title: Re: Newbie Question
Post by: Zinefer on February 18, 2008, 03:08:37 AM
I just tried running the Yatzee sample code and I recieved the same error... I must be missing something.
Title: Re: Newbie Question
Post by: skirby on February 18, 2008, 10:37:38 AM
Hello Zinefer,

I have tried with this piece of code and I do not have any problem.

Code: [Select]
#include <windows.h>

int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
MessageBox (NULL, TEXT ("Hello World!"), TEXT ("Hello!"), MB_OK);

return 0;
}

Which version of Pelles C do you use?
Title: Re: Newbie Question
Post by: Zinefer on February 18, 2008, 04:54:23 PM
I am usin 4.50.113. I dont know if it makes a diffrence, but I am programming for pocket pc.
Title: Re: Newbie Question
Post by: Stefan Pendl on February 18, 2008, 05:11:33 PM
I am usin 4.50.113. I dont know if it makes a diffrence, but I am programming for pocket pc.
It is a difference, since not all desktop API functions are available for ARM.
Title: Re: Newbie Question
Post by: Zinefer on February 18, 2008, 05:22:23 PM
Alright, but that still hasnt exactly explained why I am missing include functions in Pelles C... Is there somekind of Add-In or something that I should install?
Title: Re: Newbie Question
Post by: Stefan Pendl on February 18, 2008, 09:15:56 PM
Be sure you have selected the Pocket PC component during installation of PellesC.
I got the same error before I added them.

The following compiled fine here.
Code: [Select]
#define UNICODE
#include <windows.h>

int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpszCmdLine, int nCmdShow)
{
MessageBox(NULL, TEXT("Hello World!"), TEXT("Test"), 0);

return 0;
}
Title: Re: Newbie Question
Post by: Zinefer on February 19, 2008, 02:14:33 PM
Thank you SO very much. I feel so stupid for not seeing the checkbox.

Thanks again.