including boost : __fastcall incompatible with /clr

Started by
3 comments, last by Trillian 18 years, 3 months ago
Hello! I wrote my first code that uses the boost library (format). The only thing I did before using it was to include format.hpp, is that enough? The problem is, now if I compile a program that uses my library (which includes the boost format), I get over a hundred warnings like such: C:\Boost\boost\type_traits\detail\is_mem_fun_pointer_tester.hpp(85) : warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall' the line number goes from 85 to over 2000. I did not find a /clr option in MSVC++ .NET 2003's projet options, but the command is there in the "command line" tab. What I'm I doing wrong? Is my problem in including,linking or project options?
Advertisement
/clr is the "Use Managed Extensions" option.

You could also put 4561 into your "ignore warnings" list.
Ahhhhhhhhhhhhhhhhh!!!! Thanks!!!

Just a question :
I'm I going into more trouble if I disable this?
Is it usually needed?

In fact I do not know the difference between managed and unmanaged code
(in my head, managed code is where you have things like system.out.idunno.foo)
Do you have any of the following keywords in your code?

__gc
__nogc
gcnew
ref class

or anything like

using namespace System::Windows::Forms;

Console::WriteLine(S"Hello world");


If not, then you probably can turn off "Use Managed Extensions" without any problem.

If you are, then it's probably not too bad - that warning that you're getting looks like the compiler can figure out a work-around on its own.

If I had to guess, I would say that you're not using managed extensions at all. When you use /clr, the compiler will attempt to compile your code into CIL even if you never use managed classes or anything, so that's why the compiler warning comes up later. If you're not *actually* using any managed extensions, you can turn off /clr without changing your code at all.

[edit: I had some C# syntax in there by accident]
Thanks for the info, I'm alright!

This topic is closed to new replies.

Advertisement