Pelles C forum

C language => Work in progress => Topic started by: frankie on September 21, 2016, 08:23:29 PM

Title: fSDK© - Frankie's SDK for PellesC
Post by: frankie on September 21, 2016, 08:23:29 PM
To upgrade compiler with fSDK kit download installer (https://github.com/Frankie-PellesC/fSDK/raw/master/fSDK.exe) from github and run it
fSDK can be browsed on GitHub (https://github.com/Frankie-PellesC/fSDK)
-------------------------------------------------------------------

- 05/Jan/2019 -- V.0.2.0.0 (05.Jan.2019)
            - Update dependencies for new PellesC V.9.00
              - Fixed intrinsics
              - Fixed conditional compilation for V.8.00 compatibility
              - Minor general fixes
            - Fixed header xnamath.h
            - Added missing IID's in mmdeviceapi.h and Audioclient.h
            - Added new DXGI's
            - Fixed reference to bthprops.cpl in bthprops.lib
            - Added Backup feature to backup headers and libraries folders
            - Minor fixes and general cleaning

- 11/Feb/2018 -- V.0.1.2.2 (11.Feb.2018)
  - Fixed header MsHtmlC.h
  - Added WMI Samples
- 12/Feb/2017 -- V.0.1.2.1 (12.Feb.2017)
  - Fixed header xmllite.h (discovered by TimoVjl).
  - Added XML demo from TimoVjl
- 28/Gen/2017 -- V.0.1.2.0 (28.Jan.2017)
  - Fixed symbol 'THREAD_MODE_BACKGROUND_BEGIN' in winbase.h (discovered by Grincheux).
  - Added symbol '__FSDK__' equated to the current version in hex (0x00010200), to be used for conditional compilations to discriminate use of fSDK or standard PellesC SDK (where of course __FSDK__ is not defined).
  - Fixed minor bugs in headers and made cosmethic changes.
- 10/Dec/2016 -- V.0.1.1.1 (10.Dec.2016)
  - Fixed EXTERN_GUID macro
  - Fixed many headers for system include uniformity
  - Minor aesthetic fixes
  - Added Media Foundation demo: capture video to a file
- 04/Dec/2016 -- V.0.1.1.0 (04.Dec.2016)
  - Added more DX8 headers and libraries
  - Added DX8 Donuts3D demo
  - Fixed some bugs in headers
- 26/Nov/2016
  - Fixed former bugs.
  - Added more headers
  - Added DirectX support for DX8, DX9, DX10 and DX11
  - Added redistribuitable runtime for DirectX 8, 9, 10, 11
  - Experimentally added support and runtime for OpenGL (FreeGlut).
  - Modified Setup for minimal, full and custom installation
  - Added more Directx and OpenGl samples
- 20/Nov/2016 - Fixed some include files.
  - Added more DirectX headers and libraries
  - Added more samples
13/Nov/2016 - Fixed include files
              Added extended support DX3DEx Headers and libraries and also 2 new samples Midiplayer and a directx sample
07/Nov/2016 - Fixed libraries for __cdecl functions and some fixes also to headers
28/Oct/201
 - Added Ribbon IID's definition
 - Fixed problems for multiple GUID's definitions in UIRibbon.h
 - Added definition <#define __uuidof(x) &IID_##x> in objbase.h
 - Fixed macro IsEqualPropertyKey in propkeydef.h
 - Added Ribbon samples
14/Sep/2016 - Fixed winNt.h and winbase.h headers. Intrinsics definitions should be Ok now.
(download it from GitHub (https://github.com/Frankie-PellesC/fSDK)).
- 10/Sept/2016 - Fixed headers, libraries rebuilt fixing problems.

This is a challenging project targeting the port of the last complete MS SDK to pellesC.
The collection of headers is actually composed of 1381 headers. Many of them are a
replacement for outdated headers. The vast majority are completely missing from actual
distribution.
PellesC is an excellent compiler suite for windows, and includes the most relevant, and
most common headers, enough to compile almost all projects.
But nowadays sources available around make use of functions and interfaces that are'nt
in the actual distribution. This make very difficult to compile them under PellesC
set of headers and libraries.
This installer will made them available in the compiler include\win directory to let
you use them in your programs, including fGdiPlusFlat.h to use GDI+ under plain 'C'.

The setup also installs an Updated version for strmiids.lib (normally available only
from MS sdk) This version contains all MS GUID's at this date.
It installs also the libraries quartz.lib and Ddraw.lib.

You'll understand that I couldn't have deep checked all headers! And even if I can compile and run all my projects I expect anyway problems around.
To solve them I need your cooperation. Check against you projects and report errors possibly with a small sample that reproduce the problem.
I'll wait your feedbacks to fix the package then move it to contributions.


The keypoints of this project are:
    - Compilation speedup:
        - Because headers will be used in a plain C compiler all references, and conditional
          compilation related to C++, has been removed.
        - For similiar reasons have been removed all conditional compilation related to MIDL,
          PREFAST and annotations.
        - These headers will never be intended for MAC & relatives. So any conditional compilation
          and references to _MAC has been removed.
        - These headers are intended for PellesC, so almost all references to _MSC_VER have
          been translated to __POCC__ equivalent.
    - MS compliance.
      Because many sources available have been written for MSVC compilers the headers have been
      'adjusted' to fit MS requirements. Some of the technical problems found are:
        - Missing __declspec(selectany). MS is used to multiply define symbols tagging them with this
          specifier. This creates a kind of a 'weak' symbol that the compiler should ignore when
          multiply defined. Note that the PellesC linker have the option '/FORCE:MULTIPLE' that could
          mimic the behaviour of __declspec(selectany), but, opposed to the specifier working way, it
          will ignore *all* multiple definitions, de facto masking also eventual errors.
          The solution actually used is the conversion of all symbol instances with an equivalent
          #define.
          This should work well for base types (int, char, float, double, etc), but could be a problem
          with complex types (structs, unions, etc).
        - GUIDs, PROPKEYSs and other complex types that are tagged by __declspec(selectany).
          They are required for reference on each source file that includes the header.
          The solution used is to tie them to conditional definition. The symbols are normally defined
          as 'extern', and instanziated only if the preprocessor symbol 'INITGUID' is defined. Defining
          the symbol in only one source, before the header #include, creates a single instance of the
          symbol while there are multiple extern references.
    - ANSI C compliance.
      Many native MS headers are write with C++ in mind, and for this reason are not ANSI compliant.
      I.e. structs, unions, class, enumerations and global namespaces are all coincident in C++.
      Consider these 2 declarations:
Code: [Select]
            struct foo
            {
                int bar;
            };
        or
            typedef struct
            {
                int bar;
            } foo;
      Under C++ you can declare a variable of type 'foo' indifferently with both declarations because
      the global and struct namespaces are coincident meaning that the type 'foo' will be defined in
      any case, and the statement:
Code: [Select]
            foo mystruct = {0};
      will not produce errors with both declarations.
      But in C, in the first case, the type 'foo' is defined only in the structs namespace (or tagnames namespaces, to be sharp, and because tags are used also from unions and enumerations, the namespace is shared), and the
      statement above will produce an error. To make it work it should be:
Code: [Select]
            struct foo mystruct = {0};
      In the second case it will work for both.
      The solution used is a tweeking of declarations:
Code: [Select]

            typedef struct foo
            {
                int bar;
            } foo;
      The above code defines 'foo' in both namespaces and fix the ANSI compliance  (or at least should...).
    - Porting of C++ only headers.
      Many headers are C++ only, even if their content can be used under plain C. An example of this
      type of files are gdiplus.h, Ddraw.h, etc.
      In the port process of C++ headers to C the helper classes have not been translated.
      Not all C++ files are currently translated, but they are included in the distribution generating
      an error "C++ only header!". If you encounter one you can translate it yourself and then make it
      available, or ask for translation and wait. In any case if the header contains only 'helper' classes don't expect
      it will be taken in consideration.

The installer for new headers and libraries, 32 and 64 bits, are available from GitHub (https://github.com/Frankie-PellesC/fSDK).
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: AlexN on September 22, 2016, 08:02:28 AM
Great! Thanks! :)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on September 22, 2016, 01:32:34 PM
Thanks Alex  :)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TimoVJL on September 22, 2016, 03:29:22 PM
Big thanks to you.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on September 22, 2016, 09:33:01 PM
Thanks Timo  :)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on October 10, 2016, 06:20:40 PM
New release.
10/Sept/2016 - Fixed headers, libraries rebuilt fixing problems.
(download it from GitHub).
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on October 14, 2016, 02:03:31 PM
14/Sep/2016 - Fixed winNt.h and winbase.h headers. Intrinsics definitions should be Ok now.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 01, 2016, 11:46:10 PM
28/Oct/2016 - Added Ribbon IID's definition
     Fixed problems for multiple GUID's definitions in UIRibbon.h
     Added definition <#define __uuidof(x) &IID_##x> in objbase.h (works only for interface names)
     Fixed macro IsEqualPropertyKey in propkeydef.h

The ribbon samples shows some of the possibilities offered by the new headers and libraries.
For download go to GitHub (https://github.com/Frankie-PellesC/fSDK)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 07, 2016, 07:04:05 PM
07/Nov/2016 - Fixed libraries for __cdecl functions and some fixes also to headers
(polib adds an underscore to any symbol not decorated, so __cdecl functions come with double underscore even in imported symbols).
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TimoVJL on November 11, 2016, 11:37:02 AM
This is so great project, so everyone in this forum should support this.
Test it and let us know what it is capable.

There is some Add-Ins like this (http://forum.pellesc.de/index.php?topic=7039.msg26707#msg26707) to support testing this header set.
Just put pocc.exe pointing to it.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Robert on November 12, 2016, 01:32:45 AM
Hi Frankie:

Thank you very much for all your work on this project and also for all the help that you have given so generously to the Pelle's C community members.

I have installed Frankies SDK and have had the following problems when trying to build these samples

When building FontControl.ppj from the Pelle's C IDE these errors and warnings occur

Building CommandHandler.obj.
FontControl\CommandHandler.c(96): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
FontControl\CommandHandler.c(96): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
FontControl\CommandHandler.c(96): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
FontControl\CommandHandler.c(96): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
FontControl\CommandHandler.c(154): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
FontControl\CommandHandler.c(154): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
FontControl\CommandHandler.c(154): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
FontControl\CommandHandler.c(154): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.

When building DropDownColorPicker.ppj from the Pelle's C IDE  these errors occur

Building ColorPickerHandler.obj.
DropDownColorPicker\ColorPickerHandler.c(164): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(164): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(164): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(164): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(196): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(196): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(196): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(196): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(226): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(226): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(226): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
DropDownColorPicker\ColorPickerHandler.c(226): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.

When building ContxtPopUp.ppj from the Pelle's C IDE  these errors occur

Building RibbonIIDs.obj.
PellesC\Include\Win\RibbonIIDs.h(12): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(12): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(12): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(12): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(12): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(13): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(13): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(13): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(13): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(13): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(14): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(14): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(14): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(14): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(14): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(15): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(15): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(15): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(15): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(15): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(16): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(16): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(16): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(16): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(16): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(17): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(17): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(17): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(17): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(17): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(18): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(18): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(18): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(18): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(18): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(19): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(19): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(19): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(19): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(19): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(20): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(20): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(20): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(20): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(20): error #2001: Syntax error: expected ';' but found ')'.
PellesC\Include\Win\RibbonIIDs.h(21): warning #2099: Missing type specifier; assuming 'int'.
PellesC\Include\Win\RibbonIIDs.h(21): error #2026: Expected an identifier.
PellesC\Include\Win\RibbonIIDs.h(21): error #2001: Syntax error: expected ')' but found 'integer constant'.
PellesC\Include\Win\RibbonIIDs.h(21): error #2161: Extraneous old-style parameter list.
PellesC\Include\Win\RibbonIIDs.h(21): error #2001: Syntax error: expected ';' but found ')'.

When building Gallery.ppj from the Pelle's C IDE  these errors occur

Building BorderSizeHandler.obj.
Gallery\BorderSizeHandler.c(105): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(105): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(105): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(105): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(173): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(211): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(211): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(211): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(211): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(217): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(217): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(217): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(217): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(222): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(222): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(222): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(222): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(238): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(238): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(238): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
Gallery\BorderSizeHandler.c(238): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.



Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 12, 2016, 03:02:30 PM
Hello Robert and thanks.
I was looking at the lines you reported, but I can't find a match with sources I have loaded on GitHub.
Where you got these sources? Have you modified them? I can't find a match between the errors and the line numbers (for some lines I found a comment, not even code  :().
I would be glad if you can go again on GitHub and download the whole ribbon demos (https://github.com/Frankie-PellesC/fSDK/blob/master/Samples%20and%20Tests/Ribbon%20samples/Ribbon%20Samples_workspace.zip) and try again to compile them.
Be also sure that you have installed the last fSDK here (https://github.com/Frankie-PellesC/fSDK/blob/master/fSDK.exe).

P.S. Anybody else have the same problem?
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Robert on November 12, 2016, 07:25:23 PM
Hi Frankie:

I went to here,

https://github.com/Frankie-PellesC/fSDK

as linked in the last line of the first post of this thread.

I then clicked on the Clone or Download button and downloaded the fSDK-master.zip.

I unzipped the file and ran the fSDK.exe from the fSDK-master folder. That completed with no problem.

I then went to the fSDK-master\Samples and Tests\Ribbon samples folder and tried to run the Ribbon Samples.ppw and had errors.

I then went to the individual sample files and ran the .ppj project files and had the errors posted above.

Maybe the zip is not updated correctly?

I will try the samples at the link you posted. Thank you for your help.


Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TimoVJL on November 12, 2016, 07:31:44 PM
What version of pellesC you are using?
With versions 8 i have no errors in my tests with pocc.exe or  msvc 2013  sp 5 cl.exe.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 12, 2016, 07:45:55 PM
Robert I'm developing fSDK on PellesC V8.00.60
Which version are you using?
What's strange to me is that the lines where errors are reported have no reason to be, and in some cases it corresponds to comments.
I.e. in case of
Quote
FontControl\CommandHandler.c(96): error #2113: Left operand of '.' has incompatible type 'LPCSHCOLUMNID'.
At line 96 of CommandHandler.c I have:
Code: [Select]
        *ppv = NULL;        //ppv is defined as void **ppv;
The error you reported is relative to the use of a pointer of type LPCSHCOLUMNID with the dot (.) operator (instead of '->') for structure access....  :o
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Robert on November 12, 2016, 08:14:40 PM
Hi Frankie and TimoVJL:

I was using Version 8.00.60 (Win64).

I just uninstalled everything, Pelle's C and fSDK and did a fresh reinstall with new downloads.

All is now working.

It seems that my archived copy of the Version 8.00.60 (Win64) installer has been corrupted as the newly downloaded install properly compiled the previous fSDK samples that I was complaining about.

Thank you again for your help. This is really excellent work.

Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 12, 2016, 10:22:13 PM
Thanks again Robert.
I'm happy that everything is OK  :D
Please let me know if you found any problem.  :P
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 13, 2016, 11:20:07 PM
13/Nov/2016 - Fixed include files
              Added extended support DX3DEx Headers and libraries and also 2 new samples Midiplayer and a directx sample
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: JohnF on November 14, 2016, 09:45:12 AM
Nice job Frankie.

Here's one error.
================
B:\PellesC\Include\Win\windef.h(305): error #1012: #endif with no #if.
*** Error code: 1 ***
Done.
================

John
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 14, 2016, 10:15:11 AM
Thanks John.
Fixed!  ;)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 20, 2016, 10:11:04 PM
20/Nov/2016
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 26, 2016, 09:10:19 PM
New version V.0.1.0.5 - 26/Nov/2016
  - Fixed former bugs.
  - Added more headers
  - Added DirectX support for DX8, DX9, DX10 and DX11
  - Added redistribuitable runtime for DirectX 8, 9, 10, 11
  - Experimentally added support and runtime for OpenGL (FreeGlut).
  - Modified Setup for minimal, full and custom installation
  - Added more Directx and OpenGl samples
Downloadable from GitHub (https://github.com/Frankie-PellesC/fSDK).
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on December 04, 2016, 07:57:41 PM
04/Dec/2016 -- V.0.1.1.0 (04.Dec.2016)
  - Added more DX8 headers and libraries
  - Added DX8 Donuts3D demo
  - Fixed some bugs in headers
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on December 10, 2016, 10:54:14 PM
10/Dec/2016 -- V.0.1.1.1 (10.Dec.2016)
  - Fixed EXTERN_GUID macro
  - Fixed many headers for system include uniformity
  - Minor aesthetic fixes
  - Added Media Foundation demo: capture video to a file
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Robert on December 11, 2016, 03:17:17 AM
Hi frankie:

Thank you for the new version 10/Dec/2016 -- V.0.1.1.1 (10.Dec.2016).

The version and date information shown on the installer title bar during installation are outdated.


Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on December 11, 2016, 01:15:24 PM
Thanks Robert.  :)
I'll fix it.  :P
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TimoVJL on December 11, 2016, 01:25:45 PM
Thank's for update.

small example to list versions of some dll's in system folders
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <windows.h>
#include <winver.h>

#pragma comment(lib, "version.lib")
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "msvcrt.lib")

void __cdecl mainCRTStartup(void)
{
int __cdecl main(int argc, char **argv);
void __cdecl exit(int status);
exit(main(0,0));
}

LPSTR GetVersionInfo(TCHAR *szFileName, TCHAR *szValue, TCHAR *szBuffer, ULONG nLength)
{
LPSTR csRet;
DWORD len;

csRet = NULL;
len = GetFileVersionInfoSize(szFileName, 0);
if (len) {
csRet = NULL;
LPVOID ver = LocalAlloc(LPTR, len);
if (ver != NULL)
{
DWORD *codepage;
char fmt[256];
PVOID ptr = 0;
if (GetFileVersionInfo(szFileName, 0, len, ver))
{
if (VerQueryValue(ver, "\\VarFileInfo\\Translation", (LPVOID) & codepage, &len))
{
wsprintf(fmt, "\\StringFileInfo\\%08x\\%s", (*codepage) << 16 | (*codepage) >> 16, szValue);
if (VerQueryValue(ver, fmt, &ptr, &len))
{
lstrcpyn(szBuffer, (TCHAR *)ptr, min(nLength, len));
csRet = szBuffer;
}
}
}
LocalFree(ver);
}
}
return csRet;
}

int main(int argc, char **argv)
{
WIN32_FIND_DATA fdFile;
HANDLE hFile;
TCHAR *szMask[] = {TEXT("c:\\Windows\\system32\\d3*.*"),TEXT("c:\\Windows\\sysWOW64\\d3*.*")};
TCHAR szTmp[MAX_PATH];

for (int i = 0; i < 2; i++) {
lstrcpy(szTmp, szMask[i]);
hFile = FindFirstFile(szTmp, &fdFile);
szTmp[20] = 0;
if (hFile != INVALID_HANDLE_VALUE)
do {
if ((fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
!= FILE_ATTRIBUTE_DIRECTORY) {
TCHAR szVer[100];
lstrcpy(&szTmp[20], fdFile.cFileName);
printf("%s %s\n", szTmp, GetVersionInfo(szTmp, "ProductVersion", szVer, sizeof(szVer)));
}
} while (FindNextFile(hFile, &fdFile));
FindClose(hFile);
printf("\n");
#ifndef _WIN64
break;
#endif
}
return 0;
}
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on December 11, 2016, 10:55:04 PM
I have fixed release version.  :P
I have added 2 more samples.  ;D
The first is fMM (https://github.com/Frankie-PellesC/fSDK/tree/master/Samples_and_Tests/fMM) library to handle movie reproduction using DirectShow, containing:

Another sample, PlayCap (https://github.com/Frankie-PellesC/fSDK/tree/master/Samples_and_Tests/Multimedia%20samples/PlayCap) to show how to reproduce a captured video.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on January 28, 2017, 06:55:30 PM
New version:
- 28/Gen/2017 -- V.0.1.2.0 (28.Gen.2017)
  - Fixed symbol 'THREAD_MODE_BACKGROUND_BEGIN' in winbase.h (discovered by Grincheux).
  - Added symbol '__FSDK__' equated to the current version in hex (0x00010200), to be used for conditional
     compilations to discriminate use of fSDK or standard PellesC SDK (where of course __FSDK__ is not defined).
  - Fixed minor bugs in headers and made cosmethic changes.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: JohnF on January 30, 2017, 08:44:28 AM
Thanks Frankie.

John
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on February 12, 2017, 07:29:15 PM
New version:
- 12/Feb/2017 -- V.0.1.2.1 (12.Feb.2017)
  - Fixed header xmllite.h (discovered by TimoVjl).
  - Added XML demo from TimoVjl

To upgrade compiler with fSDK kit download installer (https://github.com/Frankie-PellesC/fSDK/raw/master/fSDK.exe) from github and run it
fSDK can be browsed on GitHub (https://github.com/Frankie-PellesC/fSDK)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Grincheux on February 13, 2017, 07:43:17 PM
How is it possible to help you in this project?
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on February 14, 2017, 09:46:37 AM
Hello Grincheux
Thank-you very much.
fSDK is an open project!
You can help testing the SDK in all your projects and, when you found a problem, creating a small piece of code (the smaller the better) that reproduce the problem. Then send it to me so I can debug it.
If you have already found the problem on yourself please post the fix here, or send it to me.
You can also create a branch on GitHub to publish the fix, add more features, modify something, ...  ;)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Grincheux on February 14, 2017, 11:30:38 AM
I told to Timo that there were 2 undefined

Code: [Select]
#define THREAD_MODE_BACKGROUND_BEGIN 0x00010000
#define THREAD_MODE_BACKGROUND_END 0x00020000

It is ok with the new version downloaded yestirday.

Ok for the tests.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on February 14, 2017, 12:07:23 PM
Thanks Grincheux  :)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TheRaven on June 09, 2017, 06:34:44 AM
O.O
Awesome (even now)!
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on February 11, 2018, 07:34:59 PM
New version:
- 11/Feb/2018 -- V.0.1.2.2 (11.Feb.2018)
  - Fixed header MsHtmlC.h
  - Added WMI Samples

To upgrade compiler with fSDK kit download installer (https://github.com/Frankie-PellesC/fSDK/raw/master/fSDK.exe) from github and run it
fSDK can be browsed on GitHub (https://github.com/Frankie-PellesC/fSDK)

Last pre-release
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: MrBcx on April 04, 2018, 04:03:02 AM
To upgrade compiler with fSDK kit download installer (https://github.com/Frankie-PellesC/fSDK/raw/master/fSDK.exe) from github and run it
fSDK can be browsed on GitHub (https://github.com/Frankie-PellesC/fSDK)
-------------------------------------------------------------------
This is a challenging project targeting the port of the last complete MS SDK to pellesC.
^^^ That is an understatement, if ever there was one!

Fantastic accomplishment Frankie and one that is very much appreciated.   Thank You!

Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on April 04, 2018, 10:08:06 AM
To upgrade compiler with fSDK kit download installer (https://github.com/Frankie-PellesC/fSDK/raw/master/fSDK.exe) from github and run it
fSDK can be browsed on GitHub (https://github.com/Frankie-PellesC/fSDK)
-------------------------------------------------------------------
This is a challenging project targeting the port of the last complete MS SDK to pellesC.
^^^ That is an understatement, if ever there was one!

Fantastic accomplishment Frankie and one that is very much appreciated.   Thank You!
Thank you  :)
I haven't received any complain up to now, so I was thinking that nobody was interested as usually happens here, apart of course the few that are still active on the site. But the starring of the project on Git-Hub is increasing recently, so I'm thinking that maybe someone will report bugs or requests. For this reason I'll wait still some time then I'll release it.
Thanks again to all that liked my work  ;).
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on July 22, 2018, 03:41:45 PM
As soon as the poinst will be fixed I'll upgrade the fSDK to meet new PellesC Release 9.00.
The new installer will not overwrite distribution SDK, but copy files in a back-up directory to allow working with both SDK.
The new PellesC 9.00 release allows the upgrade of IDE and tools without reinstalling the SDK, this will allow tools upgrading without reinstalling the SDK.
If you have any comment/feature request could be the right time to talk.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TimoVJL on September 06, 2018, 01:03:16 PM
What symbols are missing ?
What headers and libs are used ?
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: cnoob on September 07, 2018, 04:44:06 AM
What symbols are missing ?
What headers and libs are used ?

It was very careless of me. I can't reproduce the problem. fSDK is fine. The error I mentioned happen when I tried SGL (a project on this forums to shorten code of Win32 App, seem to be dead). It failed to build because missing symbol when I correctly linked sgl64.lib. I thought it's because I didn't have the correct header installed (most of the time I fix this type of error is to add missing header) so I try fSDK instead full WinSDK (too big) but receive the same error. The fault is of SGL, not fSDK. I'm sorry  :-[
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Abraham on October 09, 2018, 04:27:43 PM
It should be
Code: [Select]
            typedef struct foo
            {
                int bar;
            } foo;
not
Code: [Select]
            struct foo
            {
                int bar;
            } foo;
The missing typedef is there for so long.

The verbose way would be
Code: [Select]
            typedef struct foo foo; // global namespace

            struct foo // tagname namespace
            {
                int bar;
            };
tagname namespace is "shared" between struct, union, and enum.
Code: [Select]
            struct some
            {
                int a;
            };
            union some // collision of tagname
            {
                int a;
                unsigned int b;
            };
If an object is simple enough to be typecast, do not use unions.

Note that
Code: [Select]
            struct foo
            {
                int bar;
            } foo;
Is a "struct foo" global object of name "foo".
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on October 09, 2018, 09:23:14 PM
It should be
Code: [Select]
            typedef struct foo
            {
                int bar;
            } foo;
not
Code: [Select]
            struct foo
            {
                int bar;
            } foo;
The missing typedef is there for so long.
thank you for the report, I fixed the post.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Abraham on November 08, 2018, 02:15:44 PM
xnamath.h

You are missing some intrinsic "type punning" with those unions.

Obviously Line 1701
Code: [Select]
return reinterpret_cast<const __m128 *>(&vTemp)[0];could compile in C?

Ah, my casting.

Cannot cast from __m128i to __m128 without first creating a union then type pun it.

The fundamental flaw is that __m128 (floats), __m128i (integers), and __m128d (doubles) are introduced at different times, so they are defined as separate unions. We need to combine them into a single universal union for easier type punning instead of reinterpret_cast from C++.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TimoVJL on November 08, 2018, 05:24:55 PM
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <xnamath.h>
Code: [Select]
C:\code\fSDK\Include\xnamath.h(147): warning #2086: Use of '_Alignas' in typedef; ignored.
C:\code\fSDK\Include\xnamath.h(234): warning #2086: Use of '_Alignas' in typedef; ignored.
C:\code\fSDK\Include\xnamath.h(1698): error #2140: Type error in argument 2 to '_mm_and_si128'; expected '__m128i' but found 'XMVECTORU32'.
C:\code\fSDK\Include\xnamath.h(1699): error #2140: Type error in argument 2 to '_mm_cmpeq_epi32'; expected '__m128i' but found 'XMVECTORU32'.
C:\code\fSDK\Include\xnamath.h(1700): error #2140: Type error in argument 2 to '_mm_and_si128'; expected '__m128i' but found 'XMVECTORF32'.
C:\code\fSDK\Include\xnamath.h(1701): error #2048: Undeclared identifier 'reinterpret_cast' (did you mean: ?).
C:\code\fSDK\Include\xnamath.h(1701): error #2039: Invalid expression.
C:\code\fSDK\Include\xnamath.h(1701): error #2060: Invalid return type; expected 'union __m128' but found 'int'.
C:\code\fSDK\Include\xnamath.h(1701): error #2001: Syntax error: expected ';' but found '__m128'.
C:\code\fSDK\Include\xnamath.h(1701): error #2092: Missing identifier.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on November 08, 2018, 06:11:42 PM
Ok.
I'll add to things to be fixed.
Thanks for the feedback.
 ;)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Abraham on December 08, 2018, 11:23:39 PM
Here's my version with a few mistakes still around.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on December 09, 2018, 12:28:21 PM
Thanks Abrahm!   :)
You're one of the few, with Timo, to give a tangible help to the development!  ;)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on January 06, 2019, 12:32:10 AM
Here we are again with a new version.
The SDK has been modified for the PellesC V9.00, and includes all bugs pointed out by Timo, Abrahm and you all.
In this release has been included the backup feature. It creates a backup for the headers and the library folders.
The backup folders are named as the respective original folders name followed by the date and the time of the backup.
The user can eventually rename those directories and use them as alternatives for the compile.
This is the detail
- 05/Jan/2019 --  -- V.0.2.0.0 (05.Jan.2019)
            - Update dependencies for new PellesC V.9.00
              - Fixed intrinsics
              - Fixed conditional compilation for V.8.00 compatibility
              - Minor general fixes
            - Fixed header xnamath.h
            - Added missing IID's in mmdeviceapi.h and Audioclient.h
            - Added new DXGI's
            - Fixed reference to bthprops.cpl in bthprops.lib
            - Added Backup feature to backup headers and libraries folders
            - Minor fixes and general cleaning
I hope to haven't miss anything. Please test it and report problems.

To upgrade compiler with fSDK kit download installer (https://github.com/Frankie-PellesC/fSDK/raw/master/fSDK.exe) from github and run it
fSDK can be browsed on GitHub (https://github.com/Frankie-PellesC/fSDK)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Abraham on January 14, 2019, 07:19:24 PM
Your installer LICENSE still shows version 0.1.1.2 11-Feb-2018 instead of 0.2.0.0 5-Jan-2019.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on January 15, 2019, 01:06:05 PM
Thanks for the report Abraham.
I'll fix it.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Abraham on June 18, 2019, 01:27:19 AM
#include <DxErr.h>
#pragma comment(lib, "DxErr")

POLINK: error: Unresolved external symbol '_vsnprintf' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: error: Unresolved external symbol '__security_cookie' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: error: Unresolved external symbol '__security_check_cookie' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: error: Unresolved external symbol '__GSHandlerCheck' - referenced from 'DxErr.lib(dxerra.obj)'.
POLINK: fatal error: 4 unresolved external(s).

Not sure how to get pass this issue.

For Visual Studio, it would be: legacy_stdio_definitions.lib, but
#pragma comment(lib, "legacy_stdio_definitions")
POLINK: fatal error: File not found: 'legacy_stdio_definitions.lib'.


Recompile DxErr.c and DxErr.h from the attachments. They are adjusted to also work with ANSI, not only UNICODE.
It would conflict without removal of your dxerr.h.

DXGetErrorDescriptionW and DXGetErrorDescriptionA would have different amount of parameters when compile from source.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: frankie on June 18, 2019, 01:45:56 PM
Hello Abraham.
I'm not sure to understand what you mean.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Abraham on June 18, 2019, 05:28:48 PM
DxErr.lib in "DirectX SDK June 2010" is not linking because of external dependencies.

Clarify: This issue occurs with Windows 10, and maybe those that have Windows SDK.

I've made changes.
Use this one, and compile manually DxErr.lib for your settings:
x86 or x64.
Static Single Thread, Static Multi-Thread, or Dynamic Multi-Thread.
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: TimoVJL on June 18, 2019, 06:28:39 PM
PellesC don't support COMDAT  :(

So one source and an UNICODE support source file DxErrW.c for library
Code: [Select]
// DxErrW.c
#define UNICODE
#include "DxErr.c"

EDIT: DXUT (https://github.com/microsoft/DXUT/tree/master/Core)
Title: Re: fSDK© - Frankie's SDK for PellesC
Post by: Abraham on July 01, 2019, 06:00:26 PM
rpcdce.h

#ifndef DECLSPEC_NORETURN
#if (__POCC__ >= 800) & (__POCC_STDC_VERSION__ >= 201112L)
#define DECLSPEC_NORETURN   _Noreturn
#el
if (__POCC__ >= 500)
#define DECLSPEC_NORETURN   __declspec(noreturn)
#else
#define DECLSPEC_NORETURN
#endif
#endif

winnt.h

#ifndef DECLSPEC_NORETURN
#if (__POCC__ >= 800) & (__POCC_STDC_VERSION__ >= 201112L)
#define DECLSPEC_NORETURN   _Noreturn
#el
if (__POCC__ >= 260)
#define DECLSPEC_NORETURN   __declspec(noreturn)
#else
#define DECLSPEC_NORETURN
#endif
#endif

Not sure if anyone else place <stdnoreturn.h> before <windows.h>, but the rules require that the order of including standard headers should not break things.