NO

Author Topic: Newbie Question  (Read 5159 times)

Zinefer

  • Guest
Newbie Question
« 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

Zinefer

  • Guest
Re: Newbie Question
« Reply #1 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.

skirby

  • Guest
Re: Newbie Question
« Reply #2 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?

Zinefer

  • Guest
Re: Newbie Question
« Reply #3 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.

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Newbie Question
« Reply #4 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.
---
Stefan

Proud member of the UltraDefrag Development Team

Zinefer

  • Guest
Re: Newbie Question
« Reply #5 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?

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Newbie Question
« Reply #6 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;
}
---
Stefan

Proud member of the UltraDefrag Development Team

Zinefer

  • Guest
Re: Newbie Question
« Reply #7 on: February 19, 2008, 02:14:33 PM »
Thank you SO very much. I feel so stupid for not seeing the checkbox.

Thanks again.