Erorr compiling application with boost 1.43.0 on WinXp/VS2008
Hello everybody, I am developing some application on Visual Studio 2008. I am working on Windows XP (sp3) and our minimim requirement platform for the applcation is also WinXp. I downloaded and compiled the lasta boost version (1.43.0). However, when compiling the application I'm getting this error: C:\Boost\1.43.0\boost/asio/detail/win_fenced_block.hpp(48) : error C3861: 'MemoryBarrier': identifier not found It looks like the MSVC wants to build it as a Vista application since according to http://msdn.microsoft.com/en-us/library/ms684208%28VS.85%29.aspx minimum supported client for MemoryBarrier(void) is Windows Vista. What would be the proper fix for this issue? Thanks, Ovidiu
I am developing some application on Visual Studio 2008. I am working on Windows XP (sp3) and our minimim requirement platform for the applcation is also WinXp. I downloaded and compiled the lasta boost version (1.43.0).
However, when compiling the application I'm getting this error:
C:\Boost\1.43.0\boost/asio/detail/win_fenced_block.hpp(48) : error C3861: 'MemoryBarrier': identifier not found
It looks like the MSVC wants to build it as a Vista application since according to http://msdn.microsoft.com/en-us/library/ms684208%28VS.85%29.aspx minimum supported client for MemoryBarrier(void) is Windows Vista.
What would be the proper fix for this issue?
It probably means that you've got _WIN32_WINNT macro defined with too high value. Try to define it as #define _WIN32_WINNT 0x0501
Hello Igor,
Thanks for your answer but it was not the solution for the problem.
The _WIN32_WINNT is set to 0x0501. However, if you look into the BOOST code in win_fenced_block.hpp you can see that 'MemoryBarrier' macro is used when BOOST_MSVC is undefined or BOOST_MSVC >= 1400. I am using VS2008 so BOOST_MSVC is defined as 1500. On the other side, the mentioned macro is available only in versions of Windows newer or equal to Vista and no test for OS version is done in that file.
The problem is that BOOST 1.43.0 assumes that if you are compiling with VS2005 your programs will run on Vista. The correct test when using 'MemoryBarrier' macro would be to check if _WIN32_WINNT at least 0x0600 not testing the compiler version.
Best regards,
Ovidiu
--- On Thu, 6/17/10, Igor R
I am developing some application on Visual Studio 2008. I am working on Windows XP (sp3) and our minimim requirement platform for the applcation is also WinXp. I downloaded and compiled the lasta boost version (1.43.0).
However, when compiling the application I'm getting this error:
C:\Boost\1.43.0\boost/asio/detail/win_fenced_block.hpp(48) : error C3861: 'MemoryBarrier': identifier not found
It looks like the MSVC wants to build it as a Vista application since according to http://msdn.microsoft.com/en-us/library/ms684208%28VS.85%29.aspx minimum supported client for MemoryBarrier(void) is Windows Vista.
What would be the proper fix for this issue?
It probably means that you've got _WIN32_WINNT macro defined with too high value. Try to define it as #define _WIN32_WINNT 0x0501 _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi Igor,
No offence, I really appreciate your prompt answers.
Taking into consideration that you can compile your project then there is hope that I will eventually compile mine.
I will keep digging into the preprocessor code but if somebody has a clue, please help me.
Many thanks in advance,
Ovidiu
PS: I am using Boost 1.42.0 for now for my project since it works just fine.
--- On Tue, 6/22/10, Igor R
The problem is that BOOST 1.43.0 assumes that if you are compiling with VS2005 your programs will run on Vista.
So, how it comes that I compile my project with boost 1.43 in MSVC9.0 (VS2008), and run in on XP? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Igor R
-
Ovidiu MacSiniuc