Menu

#100 Cannot compile on MSVC 2008: stdbool.h missing

fixed
seebk
None
2018-06-28
2018-04-26
letmaik
No

This is latest master. See https://ci.appveyor.com/project/letmaik/lensfunpy/build/job/xsmk0uf5dagswta7#L445

C:\projects\lensfunpy\external\lensfun\cmake_build\lensfun.h(26) : fatal error C1083: Cannot open include file: 'stdbool.h': No such file or directory

I know it's an old version, but it would be a shame to drop support just because of stdbool.h. I haven't checked if there are other issues. 0.3.2 works with 2008.

My use case is lensfunpy, a Python binary extension linking to lensfun. In theory I can build lensfun as DLL with a newer MSVC and then build the Python 2.7 binary extension DLL that links against the DLL with MSVC 2008. However, it would make my workflow/life easier if I could do all in one MSVC version. Also, if at some point I would want to statically link lensfun into the Python binary extension then I would definitely have to use the same compiler, and Python 2.7 requires 2008. I'll drop 2.7 support at some point but would be really happy if you guys could make this work one more time :)

Discussion

  • seebk

    seebk - 2018-06-18

    Ok, that should be fixed in master. Please try and report if it works for you, I do not have Visual Studio installed right now.

     
  • seebk

    seebk - 2018-06-18
    • status: open --> pending
    • assigned_to: seebk
     
  • letmaik

    letmaik - 2018-06-19

    Your fix has a syntax error:
    #if (defined(_MSC_VER) && (_MSC_VER < 1800)
    There is a parenthesis missing at the end.

     
  • seebk

    seebk - 2018-06-28

    Sorry, should be fixed now.

     
  • letmaik

    letmaik - 2018-06-28

    Works, thanks.

     
  • seebk

    seebk - 2018-06-28
    • status: pending --> fixed