Jump to content
  • Advertisement
Sign in to follow this  

including boost : __fastcall incompatible with /clr

This topic is 4648 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?

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!