Pelles C forum
C language => Beginner questions => Topic started 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:
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:
#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
-
I just tried running the Yatzee sample code and I recieved the same error... I must be missing something.
-
Hello Zinefer,
I have tried with this piece of code and I do not have any problem.
#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?
-
I am usin 4.50.113. I dont know if it makes a diffrence, but I am programming for pocket pc.
-
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.
-
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?
-
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.
#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;
}
-
Thank you SO very much. I feel so stupid for not seeing the checkbox.
Thanks again.