Menu

#159 second C linkage of overloaded function '_interlockedbittestandset' not allowed

v1.1.x
closed
5
2014-12-22
2013-02-06
SamKu
No

When I use vs2005 (with Microsoft SDK v7.1) to build log4cplus-1.1.1-rc1, it shows:

1>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(944) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
1>        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(944) : see declaration of '_interlockedbittestandset'

Currently, I use a workaround, comment one line in win32.h:

#if (defined (_MSC_VER) && _MSC_VER >= 1400) \
    || (defined (__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 3)
// #  define LOG4CPLUS_HAVE_INTRIN_H <-- HERE
#endif

I still try to find the

Discussion

  • SamKu

    SamKu - 2013-02-06

    Sorry about the format. I cannot find a way to modify this ticket.

     
  • Václav Haisman

    Václav Haisman - 2013-02-06
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,17 @@
     When I use vs2005 (with Microsoft SDK v7.1) to build log4cplus-1.1.1-rc1, it shows:
    +
    +~~~~
     1>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(944) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
     1>        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\intrin.h(944) : see declaration of '_interlockedbittestandset'
    +~~~~
    
     Currently, I use a workaround, comment one line in win32.h:
    +
    +~~~~
     #if (defined (_MSC_VER) && _MSC_VER >= 1400) \
         || (defined (__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 3)
     // #  define LOG4CPLUS_HAVE_INTRIN_H <-- HERE
     #endif
    +~~~~
    
     I still try to find the 
    
    • assigned_to: Václav Zeman
     
  • Václav Haisman

    Václav Haisman - 2013-02-06

    I have not tried VS 2005 for a long time. I will check that.

    Are you using the CMake build system?

     
    • SamKu

      SamKu - 2013-02-07

      Yes, I use CMake build system

       
  • Václav Haisman

    Václav Haisman - 2013-02-12

    So I have done some testing and research and there is no apparent way how to fix this while still keeping intrin.h included for Visual Studio 2005. Thus I have changed the preprocessor conditional to disallow intrin.h with Visual Studio 2005. Patch is attached. I will merge it back to 1.1.x some time later. Please test it.

     
  • Václav Haisman

    Václav Haisman - 2013-02-12
    • labels: --> msvc8
     
  • Václav Haisman

    Václav Haisman - 2013-03-08

    I think this is fixed now. I am closing it.

     
  • Václav Haisman

    Václav Haisman - 2013-03-08
    • labels: msvc8 --> msvc8, fixed
    • status: open --> 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.