Menu

#155 Mismatch #endif in win32.h and build failed with MinGW.

v1.1.x
closed
5
2013-01-18
2013-01-18
StarsunYzL
No

1.1.1 rc2.

There's a mismatch #endif in win32.h. I restore a #if from previous version to detect MSVC and MinGW64, otherwise it will build failed with MinGW, because MinGW does not support *_s() functions.

1 Attachments

Discussion

  • Václav Haisman

    Václav Haisman - 2013-01-18

    What MinGW distribution are you using? What version of it?

     
    • StarsunYzL

      StarsunYzL - 2013-01-18

      tdm-gcc-4.7.1-2 from http://tdm-gcc.tdragon.net/download.
      As I remember the official MinGW(not MinGW-w64) distribution also does not support *_s() functions.

       
      • Václav Haisman

        Václav Haisman - 2013-01-18

        Some of them do support those functions for sure. I have tested that. I will try that one to see if I can work around it somehow automagically.

         
  • Václav Haisman

    Václav Haisman - 2013-01-18
    • status: open --> accepted
     
  • Václav Haisman

    Václav Haisman - 2013-01-18

    One more thing. How exactly are you building log4cplus? What build system etc. are you using? See http://log4cplus.sourceforge.net/#bug-reporting-instructions

     
    • StarsunYzL

      StarsunYzL - 2013-01-18

      Sorry, my build env:

      win7 sp1 x64
      cmake 2.8.10.2
      tdm-gcc 4.7.1-2
      log4cplus 1.1.1 rc2

      cmake out-of-source builds configuration:

      md build
      cd build
      cmake .. -G "MinGW Makefiles" ^
      -DBUILD_SHARED_LIBS:BOOL=OFF ^
      -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF ^
      -DUNICODE:BOOL=OFF ^
      -DCMAKE_BUILD_TYPE:STRING=Release
      mingw32-make

      build failed with:
      win32.h:188:2: error: #endif without #if

      simply remove that #endif, it still build failed with:
      lockfile.cxx:176:5: error: 'errno_t' was not declared in this scope

       
  • Václav Haisman

    Václav Haisman - 2013-01-18

    Please replace the win32.h file with the attached one. It fixes the issue and some more.

     
    • StarsunYzL

      StarsunYzL - 2013-01-18

      It works! Great job & thanks.

       
  • Václav Haisman

    Václav Haisman - 2013-01-18
    • labels: --> win32 mingw
    • status: accepted --> pending
     
  • Václav Haisman

    Václav Haisman - 2013-01-18
    • labels: win32 mingw --> mingw, win32
     
  • Václav Haisman

    Václav Haisman - 2013-01-18

    I have pushed the fixes to Bazaar repository. Closing.

     
  • Václav Haisman

    Václav Haisman - 2013-01-18
    • status: pending --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.