473,503 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c++/cli and boost::function

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
1 5543
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2907
by: P G | last post by:
I hope this is on topic here. I have a problem compiling a simple example of the use of boost::bind. Please take a look at the program below. ...
13
3554
by: Russell Hind | last post by:
I'm trying to use boost::bind and boost::function inside managed code, but there appears to be some code generation problems. The following code compiles fine, but the function object throws an...
8
10986
by: Lars Schouw | last post by:
Guys, Is there anyway in C++ to setup a callback for a member function that takes two arguments I am trying to use boost::function but that only works with std::bind1st that does only take one...
2
4000
by: Martin Herbert Dietze | last post by:
Hi, in a project I am using callbacks which are called like ordinary functions but in fact are Loki::Functor's encapsulating calls to non-static member functions on instances of different...
3
3038
by: ryan.mitchley | last post by:
Hi all I have a class (cPort) that is designed to receive objects and, depending on the type, call a handler (callback) in any descendant of a cProcessBlock class. Callback functions take a...
2
2617
by: Faheem Mitha | last post by:
Hi, The following bit of code compiles fine with gcc 3.3 or later, but has problems with the Intel C++ compiler version 9.1, which produces the following error message. Is this a compiler...
3
1405
by: er | last post by:
hi, class Gen{ public: Gen(double (*fun_)()):fun(fun_){}; private: double (*fun)(); }; class Op{ public:
3
3316
by: Giovanni Gherdovich | last post by:
Hello, in the following code I have a pointer (to function), say p, of type double (*)(double, double, void*) and I try to fix the second argument of the function *p to a given value (using...
19
3362
by: =?ISO-8859-1?Q?Nordl=F6w?= | last post by:
I am currently designing a synchronized queue used to communicate between threads. Is the code given below a good solution? Am I using mutex lock/unlock more than needed? Are there any resources...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.