views:

105

answers:

3

I'm writing a DLL plugin for a windows application, after adding the following includes:

#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

I get a wonderful compilation error:

Error 3 error C2143: syntax error : missing ';' before '__cdecl' c:\program files (x86)\microsoft visual studio 9.0\vc\include\locale.h 111 LeverateMetaTraderServerAPI

Help?

+3  A: 

I'm no authority on C++, but this sort of thing happens when you miss a ; off the end of your class definition.

Brian Hooper
+1  A: 

someone who isn't really smart added this :

#define __declspec(dllexport) __stdcall APIENTRY

to one of the API .h files your including

Hellfrost
So that's the answer then?
manifest
i dont quite understand the reason, but basically yep
Hellfrost
+1  A: 

This error is (with high probability) not caused by Boost. It's probably either the result of a missing semicolon somewhere else in your code or triggered by a missing header include leaving some macro undefined.

hkaiser