FWIW, I also tried the second option (after correcting the spelling :-)) and it also works. So, looking at rexxapitypes.h, the comments indicated inttypes.h was not available as of 2013 VC++. Since I'm running VS Community 2015 and setting/DHAVE_INTTYPES_H in my makefile allows the compile to run successfully, I'd say that inttypes.h is now available. Hope that helps in regard to removing the conditionals in rexxapitypes.h.

Gil
On 7/7/2017 1:02 PM, Gil Barmwater wrote:

Adding the first option - /DHAVE_STDINT_H - seems to do the trick. Thanks a bunch!

Gil
On 7/7/2017 12:31 PM, Rick McGuire wrote:


On Fri, Jul 7, 2017 at 11:25 AM, Gil Barmwater <[email protected] <mailto:[email protected]>> wrote:

    Here is the first (of many) errors that I get:

    C:\Program Files (x86)\Microsoft Visual Studio
    14.0\VC\INCLUDE\stdint.h(17): error C2371: 'int8_t':
    redefinition; different basic types
    c:\program files (x86)\oorexx\api\rexxapitypes.h(74): note: see
    declaration of 'int8_t'

    I have the 5.0.0 version (32-bit) of ooRexx and am getting the
    header files from it.

    Any clues?

Yeah, older versions of the MS compilers did not define a lot of the asni portable integer types so rexxapitypes.h had a fall back of defining these directly. Add the option

   /DHAVE_STDINT_H

to your compile statement. If that doesn't work, try

  /DHAVE_INT_TYPES_H

Since the clang warning removal changes have deprecated the older compiler versions for building, it might be time to explore removing those conditionals in 5.0.0.

Rick


    Gil

    On 7/7/2017 11:03 AM, Rick McGuire wrote:
    Also, what version of the interpreter header files are you
    compiling with?

    Rick

    On Fri, Jul 7, 2017 at 10:42 AM, Gil Barmwater
    <[email protected] <mailto:[email protected]>> wrote:

        I have continued to experiment with the Native APIs and have
        had some modest success. However, I just ran into an issue
        which I hope someone can help me to understand.

        The code I have been using as a starting point is
        runRexxProgram.cpp in the ...\samples\native.api folder.  It
        uses the stdio.h library and the printf() function to do
        console I/O. When I learned C++ (more than 10 years ago!),
        the way to do console I/O was with the iostream library and
        the cout class.  So I decided to see if I could "rewrite"
        the console I/O parts of the program to use the iostream way
        of doing it.  But as soon as I add #include <iostream> to
        the program, I get multiple compiler errors that seem to
        indicate an incompatibility with the type definitions in
        oorexxapi.h. Is this a known restriction or am I doing
        something wrong?

        Thanks in advance for helping me understand this!

--
        Gil Barmwater


        
------------------------------------------------------------------------------
        Check out the vibrant tech community on one of the world's most
        engaging tech sites, Slashdot.org! http://sdm.link/slashdot
        _______________________________________________
        Oorexx-devel mailing list
        [email protected]
        <mailto:[email protected]>
        https://lists.sourceforge.net/lists/listinfo/oorexx-devel
        <https://lists.sourceforge.net/lists/listinfo/oorexx-devel>




    
------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, Slashdot.org!http://sdm.link/slashdot


    _______________________________________________
    Oorexx-devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/oorexx-devel
    <https://lists.sourceforge.net/lists/listinfo/oorexx-devel>

-- Gil Barmwater


    
------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, Slashdot.org! http://sdm.link/slashdot
    _______________________________________________
    Oorexx-devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/oorexx-devel
    <https://lists.sourceforge.net/lists/listinfo/oorexx-devel>




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot


_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel
--
Gil Barmwater


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Gil Barmwater

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to