Sign in to follow this  

including boost : __fastcall incompatible with /clr

This topic is 4343 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

This topic is 4343 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this