By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,686 Members | 1,558 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,686 IT Pros & Developers. It's quick & easy.

c++/cli and boost::function

P: n/a
Trying to use boost::function in a C++/CLI program. Here is code:

pragma once

#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>

using namespace System;

class Command
{
friend class CommandInterpreter;

virtual boost::shared_ptr<Commandinterpret(String ^ cmd) = 0; //
returns 0 if not interpreted, a clone of itself otherwise.
public:
virtual void operator() (System::Net::Sockets::NetworkStream ^
stream) = 0;

};

class Echo : public Command
{
boost::shared_ptr<Commandinterpret(String ^ cmd)
{
return boost::shared_ptr<Command>(new Echo());
}

public:
void operator() (System::Net::Sockets::NetworkStream ^ stream)
{
String ^ str = "I SHOULD BE ECHOING SOMETHING.";
stream->Write(Text::Encoding::ASCII->GetBytes(str), 0, str->Length);
}
};

class CommandInterpreter
{
std::vector< boost::shared_ptr<Command prototypes;
CommandInterpreter()
{
prototypes.push_back(boost::shared_ptr<Command>(ne w Echo));
}

boost::function<void (System::Net::Sockets::NetworkStream ^)>
find_command(String ^ str)
{
for (std::vector< boost::shared_ptr<Command::iterator it =
prototypes.begin();
it != prototypes.end();
++it)
{
boost::shared_ptr<Commandcmd = (*it)->interpret(str);
if (cmd)
return *cmd;
}
return boost::function<void (System::Net::Sockets::NetworkStream ^)>();
}

public:
static boost::function<void (System::Net::Sockets::NetworkStream^)>
interpret(String ^ str)
{
static CommandInterpreter interpreter;
return interpreter.find_command(str);
}
};

Here is output:

1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(85)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(88)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(91)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(94)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(183)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(186)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(189)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(192)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(281)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(284)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(287)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(290)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(379)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(382)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(385)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(388)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(477)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(480)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(483)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(486)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(575)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(578)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(581)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(584)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(673)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(676)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(679)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(682)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(771)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(774)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(777)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(780)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(869)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(872)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(875)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(878)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(967)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(970)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(973)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(976)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1065)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1068)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1071)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1074)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1163)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1166)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1169)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1172)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1261)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1264)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1267)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1270)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1359)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1362)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1365)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1368)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1457)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1460)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1463)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1466)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1555)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1558)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1561)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1564)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1653)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1656)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1659)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1662)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1751)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1754)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1757)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1760)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1849)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1852)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1855)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1858)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1947)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1950)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1953)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1956)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2045)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2048)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2051)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2054)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2143)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2146)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2149)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2152)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2241)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2244)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2247)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2250)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2339)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2342)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2345)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2348)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2437)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2440)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2443)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2446)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2535)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2538)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2541)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2544)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(689) :
warning C4793: 'vararg' : causes native code generation for function
'bool boost::detail::function::has_empty_target(...)'
1>
C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(686) :
see declaration of 'boost::detail::function::has_empty_target'
1>C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(92) : warning
C4793: 'vararg' : causes native code generation for function 'void
boost::detail::sp_enable_shared_from_this(const
boost::detail::shared_count &,...)'
1 C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(90) : see
declaration of 'boost::detail::sp_enable_shared_from_this'
1>c:\projects\utilities\test_worker\test_worker\co mmand.h(45) : error
C2027: use of undefined type 'boost::function<Signature>'
1 with
1 [
1 Signature=void (System::Net::Sockets::NetworkStream ^)
1 ]
1>c:\projects\utilities\test_worker\test_worker\co mmand.h(54) : error
C2514: 'boost::function<Signature>' : class has no constructors
1 with
1 [
1 Signature=void (System::Net::Sockets::NetworkStream ^)
1 ]
1>c:\projects\utilities\test_worker\test_worker\co mmand.h(59) : error
C2027: use of undefined type 'boost::function<Signature>'
1 with
1 [
1 Signature=void (System::Net::Sockets::NetworkStream ^)
1 ]
Seems to me the warnings should be fine and I see no reason why it can't
find boost::function<Signatureas I've included the proper headers and
am using the appropriate namespace. Any ideas?
Feb 12 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Joe
Here's a thread a ways back on this issue. I think the bottom line is that
you cannot compile boost code to MSIL managed code. But you can compile
boost code to native code and interop between manage and unmanage code. >
http://www.boost.org/tools/build/v1/vc-8_0-tools.html

Joe

"Joe" <ju**@junk.comwrote in message
news:80**************************@KNOLOGY.NET...
>
<gf****@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
>Has anyone tried to use Boost.Filesystem with C++/CLI? I'm trying to
get some code that worked correctly in my native application to work on
my C++/CLI program. The code is in a header file in a native C++ static
library.

Boost does not support the CLR platform.
That just means you can't get pure managed code. C++/CLI lets you mix
managed code with native, and the native code can use the full C++ language
essentially without restrictions.
>
http://www.boost.org/tools/build/v1/vc-8_0-tools.html


>>
inline void execute_files(std::string const& dir, std::string
const& match, bool recursive = true, lua_State* interpreter = 0)
{
namespace bfs = boost::filesystem;

bfs::path dirpath(dir); // (1)

if (!bfs::exists(dirpath)) return;
if (!interpreter) interpreter = lua_interpreter();

bfs::directory_iterator end_itr;
for (bfs::directory_iterator itr(dirpath); itr != end_itr;
++itr)
{
if (!bfs::is_directory(*itr))
{
if (itr->leaf().find(match) != std::string::npos)
execute_file(itr->string());
}
else if (recursive)
{
execute_files(itr->string(), match, recursive,
interpreter);
}
}
}

The problem I'm having happens in the constructor of bfs::path (namely
line (1)) at the first recursive call. An exception is thrown which I
can't seem to get a helpful message from. It seems the string returned
from itr->string() is invalid. Has anyone tried to use Boost.Filesystem
in C++/CLI before? Any ideas on what could be causing this problem?

Thanks,
George Faraj



"Noah Roberts" <us**@example.netwrote in message
news:eq**********@aioe.org...
Trying to use boost::function in a C++/CLI program. Here is code:

pragma once

#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>

using namespace System;

class Command
{
friend class CommandInterpreter;

virtual boost::shared_ptr<Commandinterpret(String ^ cmd) = 0; //
returns 0 if not interpreted, a clone of itself otherwise.
public:
virtual void operator() (System::Net::Sockets::NetworkStream ^ stream) =
0;

};

class Echo : public Command
{
boost::shared_ptr<Commandinterpret(String ^ cmd)
{
return boost::shared_ptr<Command>(new Echo());
}

public:
void operator() (System::Net::Sockets::NetworkStream ^ stream)
{
String ^ str = "I SHOULD BE ECHOING SOMETHING.";
stream->Write(Text::Encoding::ASCII->GetBytes(str), 0, str->Length);
}
};

class CommandInterpreter
{
std::vector< boost::shared_ptr<Command prototypes;
CommandInterpreter()
{
prototypes.push_back(boost::shared_ptr<Command>(ne w Echo));
}

boost::function<void (System::Net::Sockets::NetworkStream ^)>
find_command(String ^ str)
{
for (std::vector< boost::shared_ptr<Command::iterator it =
prototypes.begin();
it != prototypes.end();
++it)
{
boost::shared_ptr<Commandcmd = (*it)->interpret(str);
if (cmd)
return *cmd;
}
return boost::function<void (System::Net::Sockets::NetworkStream
^)>();
}

public:
static boost::function<void (System::Net::Sockets::NetworkStream^)>
interpret(String ^ str)
{
static CommandInterpreter interpreter;
return interpreter.find_command(str);
}
};

Here is output:

1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(85)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(88)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(91)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(94)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(183)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(186)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(189)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(192)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(281)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(284)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(287)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(290)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(379)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(382)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(385)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(388)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(477)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(480)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(483)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(486)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(575)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(578)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(581)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(584)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(673)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(676)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(679)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(682)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(771)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(774)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(777)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(780)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(869)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(872)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(875)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(878)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(967)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(970)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(973)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(976)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1065)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1068)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1071)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1074)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1163)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1166)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1169)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1172)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1261)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1264)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1267)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1270)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1359)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1362)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1365)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1368)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1457)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1460)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1463)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1466)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1555)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1558)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1561)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1564)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1653)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1656)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1659)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1662)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1751)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1754)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1757)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1760)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1849)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1852)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1855)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1858)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1947)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1950)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1953)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(1956)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2045)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2048)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2051)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2054)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2143)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2146)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2149)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2152)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2241)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2244)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2247)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2250)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2339)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2342)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2345)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2348)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2437)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2440)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2443)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2446)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2535)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2538)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2541)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp(2544)
: warning C4561: '__fastcall' incompatible with the '/clr' option:
converting to '__stdcall'
1>C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(689) :
warning C4793: 'vararg' : causes native code generation for function 'bool
boost::detail::function::has_empty_target(...)'
1C:\Boost\include\boost-1_33_1\boost/function/function_base.hpp(686) :
see declaration of 'boost::detail::function::has_empty_target'
1>C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(92) : warning C4793:
'vararg' : causes native code generation for function 'void
boost::detail::sp_enable_shared_from_this(const
boost::detail::shared_count &,...)'
1 C:\Boost\include\boost-1_33_1\boost/shared_ptr.hpp(90) : see
declaration of 'boost::detail::sp_enable_shared_from_this'
1>c:\projects\utilities\test_worker\test_worker\co mmand.h(45) : error
C2027: use of undefined type 'boost::function<Signature>'
1 with
1 [
1 Signature=void (System::Net::Sockets::NetworkStream ^)
1 ]
1>c:\projects\utilities\test_worker\test_worker\co mmand.h(54) : error
C2514: 'boost::function<Signature>' : class has no constructors
1 with
1 [
1 Signature=void (System::Net::Sockets::NetworkStream ^)
1 ]
1>c:\projects\utilities\test_worker\test_worker\co mmand.h(59) : error
C2027: use of undefined type 'boost::function<Signature>'
1 with
1 [
1 Signature=void (System::Net::Sockets::NetworkStream ^)
1 ]
Seems to me the warnings should be fine and I see no reason why it can't
find boost::function<Signatureas I've included the proper headers and am
using the appropriate namespace. Any ideas?

Feb 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.