
7 Mar
2009
7 Mar
'09
5:10 p.m.
Conrad Scott:
I'm trying to use g++ (and MinGW) to compile a win32 Direct3X program that I've written under Visual C++. All is well (so far) except for one thing.
I'm using the technique suggested in the Boost shared_ptr documentation to store pointers to COM objects, which works fine under Visual C++ but under g++ (either 3.4.x or 4.3.x) I get errors about the call to mem_fn being ambiguous due to stdcall / non-stdcall overloading.
I can get mem_fn_stdcall_test.cpp to compile and pass with mingw g++ 3.4.4 if I take out the
#define BOOST_MEM_FN_ENABLE_STDCALL
line. I'm not sure why or how this works, but it does. :-)