NO

Author Topic: Documentaton .... headers and libs...  (Read 6523 times)

CommonTater

  • Guest
Documentaton .... headers and libs...
« on: August 21, 2012, 10:32:44 pm »
If you look at the attached screencap, you will see that Pelles C supplies only a small subset of the headers and libs available in the windows SDK... so 3 questions...
 
1) Is there any documentation available to show what is and isn't included?
2) Is there any effort made for translating/implementing the missing parts?
3) Can Pelles C use the windows sdk headers and libs directly?
« Last Edit: August 22, 2012, 11:31:46 am by CommonTater »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1888
Re: Documentaton .... headers and libs...
« Reply #1 on: August 22, 2012, 10:01:26 am »
The size is not a valid indication. Pelle removed tons of comments from headers, which become lighter. Moreover MS SDK contains libs and headers for MFC, ATL,  other C++ headers, etc .
I don't know if a detailed list of what is included and what is not exists. I'm sure that the almost everything related to C programming is included.
As general rule you can use SDK header directly at expense of some PellesC special or added functions.
Linking with MSVC library should remove other problems.

CommonTater

  • Guest
Re: Documentaton .... headers and libs...
« Reply #2 on: August 22, 2012, 11:19:42 am »
The size is not a valid indication. Pelle removed tons of comments from headers, which become lighter. Moreover MS SDK contains libs and headers for MFC, ATL,  other C++ headers, etc .

I was looking more at the file counts than sizes... 1,914 vs 516 includes... if we write half of that off to C++ headers, we still have almost 500 more headers in the SDK ... similar math applies for libs... leaving me to ponder exactly what isn't included.

Quote
I don't know if a detailed list of what is included and what is not exists. I'm sure that the almost everything related to C programming is included.

COM support is very limited. Direct X is not there. DShow (and related) is not there.  But what else?
A detailed list would be nice.

Quote
As general rule you can use SDK header directly at expense of some PellesC special or added functions.
Linking with MSVC library should remove other problems.

I'm going to have to give this a better try than I did... the first attempt was something of a failure, leaving me with the always enjoyable "More than 100 errors, please improve yourself" report from the compiler. :D

Thing is... It would be nice if people could upload any conversions they've done into the User Contributions area.  The upload limit has been increased to 1024K, so most things should fit.
 
« Last Edit: August 22, 2012, 11:22:13 am by CommonTater »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1965
Re: Documentaton .... headers and libs...
« Reply #3 on: August 22, 2012, 12:46:24 pm »
If you search words 'extern "C" {'

Windows SDK 6.0a 342 files
Windows SDK 7.0  366 files
Windows SDK 7.1  366 files
May the source be with you

CommonTater

  • Guest
Re: Documentaton .... headers and libs...
« Reply #4 on: August 22, 2012, 03:45:16 pm »
If you search words 'extern "C" {'

Windows SDK 6.0a 342 files
Windows SDK 7.0  366 files
Windows SDK 7.1  366 files


As I understood it, the "extern C" thing was so C++ would see them as "old style" headers... or am I missing the significance of it?


Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1888
Re: Documentaton .... headers and libs...
« Reply #5 on: August 22, 2012, 03:52:26 pm »
That are 'C' headers, or 'native programming API' as MS call it now.
 'extern "C" {' instructs C++ compiler about the plain 'C' content of the header.

DirectX has never been in the distribution, DShow is relatively recent   ::)
Anyway the direct include should work fine.

CommonTater

  • Guest
Re: Documentaton .... headers and libs...
« Reply #6 on: August 22, 2012, 04:04:34 pm »
That are 'C' headers, or 'native programming API' as MS call it now.
 'extern "C" {' instructs C++ compiler about the plain 'C' content of the header.

DirectX has never been in the distribution, DShow is relatively recent   ::)
Anyway the direct include should work fine.

Maybe I'm jinxed or something but I just spent an hour trying to get "Hello Windows" to run using the SDK headers and libs... I'm still getting floods of errors ...  :o
 
Code: [Select]
#include <windows.h>

int WINAPI WinMain(HINSTANCE hinst, HINSTANCE pinst, LPTSTR cmdl, int show)
  {
    MessageBox(NULL,"HELLO from Windows","Wow",MB_OK);
    return 0;
  }

Seroiusly... It bombs out at the "more than 100 errors message" no matter what I do and all the errors originate in the headers...
 
FWIW... Direct Show has been around since at least Win2000 ... Maybe even before.  It became part of the SDK (instead of DirectX) about 6 or 7 years ago.
 
« Last Edit: August 22, 2012, 04:12:17 pm by CommonTater »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1965
Re: Documentaton .... headers and libs...
« Reply #7 on: August 22, 2012, 04:37:21 pm »
With WDK 7600.16385.win7_wdk.100208-1538 you can compile this
http://www.microsoft.com/en-us/download/details.aspx?id=11800
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#pragma nodefaultlib
#pragma comment(lib, "msvcrt")

int WINAPI WinMain(HINSTANCE hinst, HINSTANCE pinst, LPTSTR cmdl, int show)
{
MessageBox(NULL, "HELLO from Windows", "Wow", MB_OK);
return 0;
}
« Last Edit: August 22, 2012, 05:12:34 pm by timovjl »
May the source be with you

CommonTater

  • Guest
Re: Documentaton .... headers and libs...
« Reply #8 on: August 22, 2012, 09:04:50 pm »
With WDK 7600.16385.win7_wdk.100208-1538 you can compile this
http://www.microsoft.com/en-us/download/details.aspx?id=11800
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#pragma nodefaultlib
#pragma comment(lib, "msvcrt")

int WINAPI WinMain(HINSTANCE hinst, HINSTANCE pinst, LPTSTR cmdl, int show)
{
MessageBox(NULL, "HELLO from Windows", "Wow", MB_OK);
return 0;
}

Thanks Timo... I've got some free time tonight and will give it a try.

CommonTater

  • Guest
Re: Documentaton .... headers and libs...
« Reply #9 on: August 23, 2012, 03:50:35 pm »
Well, I got some very basic 32 bit code to compile using the SDK's headers and libs. However 64 bit code still dumps a ton of errors as does anything more complex than the "hello windows" example.  It is apparent that considerable work has gone into the headers and libs included with Pelles C (Thank you Pelle!).

So... back to square one... trying to figure out what's what and puzzling what I have to do to get the missing stuff working...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1965
Re: Documentaton .... headers and libs...
« Reply #10 on: August 23, 2012, 05:24:17 pm »
Quick test with SDK v7.0.
I just insert wchar.h before windows.h
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <wchar.h> // from PellesC include
#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
...
or define __STRALIGN_H_
and build some projects both to 32 and 64 bit.
« Last Edit: August 23, 2012, 05:48:48 pm by timovjl »
May the source be with you

CommonTater

  • Guest
Re: Documentaton .... headers and libs...
« Reply #11 on: August 23, 2012, 06:19:00 pm »
Quick test with SDK v7.0.
I just insert wchar.h before windows.h
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <wchar.h> // from PellesC include
#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
...
or define __STRALIGN_H_
and build some projects both to 32 and 64 bit.

Ok, tried that and it seems to work on simple things but adding in networking and other functions just makes it bomb out again...


Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1888
Re: Documentaton .... headers and libs...
« Reply #12 on: August 24, 2012, 11:14:59 am »
I don't have time to check myself, but I think that the problem is simply related to MS compiler predefined symbols.
To use SDK that symbols have to be defined.
PellesC defines its own symbols that are compatible with revised PellesC headers.
I don't see any other reason for which it should not work.

CommonTater

  • Guest
Re: Documentaton .... headers and libs...
« Reply #13 on: August 24, 2012, 04:49:21 pm »
Hi Frankie...
The only thing I can find on preprocessor macros is this... http://msdn.microsoft.com/en-us/library/aa383745 and it's not much help at all.

Quote
I don't see any other reason for which it should not work.

Neither did I when I first tried this...
 
Oh well... I've now spent most of a week on this and gotten no closer to a solution. 
 
I do hope my frustration hasn't been too apparent in all this...
I just seem to be running into roadblocks everwhere I go and to be honest it's starting to really piss me off.
 
It's like this...
  • Pelles C is incomplete with several entire subsections of the API not available.
  • If I jump over to C++ I end up with IDEs that massively suck and API sets that are just as incomplete.
  • VC++ is the obvious choice here but unless I want to manually edit .RC files, thats $1,000+
  • Pelle has declined to open POIDE for true multi-compiler integration.
  • There apprears to be no real development going on with Pelles C right now.
  • If I were to go by downloads of addins and user contributions there's about 5 of us.
  • Then there's the optimizer bugs that keep sabotaging my code since ver 6.0.
  • Add all these false positives from anti-virus programs.
  • Then all the difficulty heaped upon shareware and freeware developers
  • and the final blow... Windows 8 with it's silly Metro Apps
... and just lately I've been thinking about packing the whole thing in.

I need a vacation!

 
« Last Edit: August 24, 2012, 04:52:26 pm by CommonTater »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1888
Re: Documentaton .... headers and libs...
« Reply #14 on: August 24, 2012, 05:09:34 pm »
Thanks God it's Friday!!!   ;D
Let talk about next monday......  8)