in reply to Re^2: (solved) Clean smoke-test install for Inline based modules using Inline::MakeMaker
in thread Clean smoke-test install for Inline based modules using Inline::MakeMaker

Thanks for that report. That has to be an Inline::CPP issue, so a separate problem. syphilis and I thought we had solved it a couple weeks ago, but it looks like more attention is required. I'll get to work on it. You must be in the 7% that are still having problems with Inline::CPP. My goal there is to get that module to the point that it installs for all systems that Inline::C installs for (assuming they have a C++ compiler), which would be about 98%.

More details: The problem is related to how C++ has evolved and standardized. As I'm sure you know better than I, before a standard was adopted C++ headers usually had the .h extension. More recently (which really isn't all that recent now) C++ standardized around headers without the .h extension. Inline::CPP automatically includes <iostream>, or <iostream.h>. It's supposed to detect which is required, and for the majority of systems it seems to get it right. It looks like in your case it's guessing wrong. Now that I know it's still an issue I can turn my sights on it again. It's enough of a sore-spot that I'm almost inclined to eliminate the automatic inclusion of <iostream>, but that wouldn't really solve the problem of distributing code based on Inline::CPP, as it just forces module authors to try to figure out how to decide between '.h' or no '.h' themselves.


Dave

  • Comment on Re^3: (solved) Clean smoke-test install for Inline based modules using Inline::MakeMaker

Replies are listed 'Best First'.
Re^4: (solved) Clean smoke-test install for Inline based modules using Inline::MakeMaker
by BrowserUk (Patriarch) on Dec 15, 2011 at 19:35 UTC

    The test in Inline::CPP.pm is

    my $iostream = "iostream"; # $iostream .= ".h" unless $o->{ILSM}{STD_IOSTREAM}; if($o->{ILSM}{MAKEFILE}{CC} =~ /^cl/) { $iostream .= ".h" unless $o->{ILSM}{STD_IOSTREAM}; } $o->{ILSM}{AUTO_INCLUDE} =~ s|%iostream%|$iostream|g;

    Ie. If the compiler command is 'cl' append '.h'. But, according to MS, all their compilers since VS 2003 now only supply the newer standard extension-less standard header files.

    I have Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64 which I memory serves equates to VS 2008; internal version 9; File format version 10. (Damn I wish they'd use ONE bloody name for things!), so I think the above test will need to be more selective.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Thanks again.

      I'm thinking that this may better be handled by #ifdef segments, as surely I should be able to find some examples of robust solutions implementing that approach. So far, however, I seem to not be using search terms that land me on anything useful.


      Dave

        I suspect that this might do the trick:

        _MSC_VER Reports the major and minor versions of the compiler. For example, 1310 for Microsoft Visual C++ .NET 2003. 1310 represents +version 13 and a 1.0 point release. The Visual C++ 2005 compiler version is 1400. In Visual Studio 2008, _MSC_VER is defined as 1500. The Visual Studio 2010, _MSC_VER is defined as 1600.

        Anything less than 1300 and you add the '.h', otherwise leave it off.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?