Dan_2 0 Newbie Poster

Hello,

I have code which uses the Boost formatting library. When I try to compile the code, it gives me a single error. The code looks as follows:

#include "stdafx.h"
#include "DataStructs.h"
#include "FileIO.h"
#include <sstream>
#include <boost/format.hpp>

...
void SaveSingleReads()          // Save the single wavelength scan(s) to a file
{
    std::stringstream temp_format;
    ...
    temp_format << boost::format("%.1f") % Plate.Wells[i][j]->Scans[k]->temperature;
    ...
}

The error is: Error 1 error C3861: '_InterlockedExchange': identifier not found C:\Utilities\Boost\boost_1_55_0\boost\smart_ptr\detail\spinlock_w32.hpp

I think I have the correct configuration; in Properties -> C/C++ -> General -> Additional Include Directories I have C:\Utilities\Boost\boost_1_55_0, and I'm pretty sure it's recognized because Intellisense recognizes boost::format as a function. I also have Precompiled Header set to Not Using Precompiled Header, although I get the error with "Use (/Yu)" as well. Does anyone have any idea where to start troubleshooting? This is my first time using Boost.

Thanks,
Dan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.