second C linkage of overloaded function '_interlockedbittestandset' not allowed
Logging Framework for C++
Brought to you by:
wilx
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
Sorry about the format. I cannot find a way to modify this ticket.
Diff:
I have not tried VS 2005 for a long time. I will check that.
Are you using the CMake build system?
Yes, I use CMake build system
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.
I think this is fixed now. I am closing it.