MM intrinsics not supported in the pure mode!

  • Thread starter Thread starter Anna Smidt
  • Start date Start date
A

Anna Smidt

Sorry, I have a question again:

I am trying to debug/ release a CLR application (that uses the
FrameWork). No when I try to compile it, it stops in this line in

-------mmintrin.h--------

#if defined(_M_CEE_PURE)
#error ERROR: MM intrinsics not supported in the pure mode!
#else

I found out that mmintrin.h comes from

c:\programs\Microsoft Visual Studio 9.0\VC\Include

So at first I wanted to find out if this include in really needed and
removed it from Options->VC++ Directories->Includes
But then a dozen of other errors where thrown, and I thought that these
includes are really needed.

Can somebody tell me what I should do or how to refine my question/
error report to be more concrete?
Thank you!

Anna
 
I checked everything from the start again, and without changing
anything, I get the follow error first:

Error 1 fatal error C1189: #error : Building MFC application with
/MD[d] (CRT dll version) requires MFC shared dll version. Please #define
_AFXDLL or do not use /MD[d] C:\Programs\Microsoft Visual Studio
9.0\VC\atlmfc\include\afx.h 24 VideoASM
 
<<Please #define _AFXDLL or do not use /MD[d]

Where could I have set /MD[d]? I have looked around in my app like crazy
but couldn't find it...
 
I have found out that I can go to "project"->"properties" and switch
from "Pure MSIL Common Language Runtime Support (/clr:pure) to "Common
Language Runtime Support (/clr)", but when I do, I get another compiler
error:

Error 10 error C2857: '#include' statement specified with the
/Ycstdafx.h command-line option was not found in the source file
C:\Programs\Microsoft Visual Studio 9.0\VC\include\xlocnum 135 VideoASM

Wow, that's is really nerve-wrecking. I will be happy if I have overcome
these problems.
 
Anna Smidt said:
<<Please #define _AFXDLL or do not use /MD[d]

Where could I have set /MD[d]? I have looked around in my app like crazy
but couldn't find it...

In the project's properties (C/C++ -> code generation -> run time library)


Armin
 
Anna Smidt said:
I have found out that I can go to "project"->"properties" and switch
from "Pure MSIL Common Language Runtime Support (/clr:pure) to
"Common Language Runtime Support (/clr)", but when I do, I get
another compiler error:

Error 10 error C2857: '#include' statement specified with the
/Ycstdafx.h command-line option was not found in the source file
C:\Programs\Microsoft Visual Studio 9.0\VC\include\xlocnum 135
VideoASM

Wow, that's is really nerve-wrecking. I will be happy if I have
overcome these problems.

The documentation says:
http://msdn.microsoft.com/en-us/library/zeh74f9z.aspx
Therefore I guess, the file to be compiled does not contain
#include "stdafx.h"


Armin
 
Instead of removing all MFC things from my project (although I do not
need them anymore), I went to "properties" and said "Use of MFC: Use MFC
in a shared DLL".
Now I have this problem remaining:

Error 10 error C2857: '#include' statement specified with the
/Ycstdafx.h command-line option was not found in the source file
C:\Programs\Microsoft Visual Studio
9.0\VC\atlmfc\include\atlsimpstr.h 287 VideoASM

It's really not very easy today, and I'm about to explode. Microsoft
should have included a messagebox that pops up after the 100th compiler
error and tells "Don't give up. You're almost there."

Anna
 
Anna said:
Sorry, I have a question again:

I am trying to debug/ release a CLR application (that uses the
FrameWork). No when I try to compile it, it stops in this line in

-------mmintrin.h--------

#if defined(_M_CEE_PURE)
#error ERROR: MM intrinsics not supported in the pure mode!
#else

I found out that mmintrin.h comes from

c:\programs\Microsoft Visual Studio 9.0\VC\Include

So at first I wanted to find out if this include in really needed and
removed it from Options->VC++ Directories->Includes
But then a dozen of other errors where thrown, and I thought that
these includes are really needed.

Can somebody tell me what I should do or how to refine my question/
error report to be more concrete?

Well, you wouldn't want to remove the whole include directory, just the one
line in one (or several) of your files that refers to "mmintrin.h". But if
you're using MM instrinsics then there is no equivalent instruction on the
MSIL abstract machine, you'll have to generate native code (which means a
mixed assembly, such will work just fine in .NET applications as long as you
have Full Trust).
 
Armin,
thanks for your reply. It arrived at the right time because I'm really
desperate.
The error

Error 10 error C2857: '#include' statement specified with the
/Ycstdafx.h command-line option was not found in the source file
C:\Programs\Microsoft Visual Studio
9.0\VC\atlmfc\include\atlsimpstr.h 288 VideoASM

is thrown in

C:\Programs\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlsimpstr.h

This means it's a MS thing, and I am not sure if I should type #include
"stdafx.h" into it.
Well, I did, and then +100 compiler errors were thrown in

Error 1 error C2504: 'CDialog' : base class undefined
C:\Programs\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxdlgs.h 108
VideoASM

So I guess it's not correct how I did it.
Can you help?

Damn, I'm really desperate. Maybe it's because I worked all done on the
same problem, but I want to get it going.
Anna
 
Can we say that the main problem is this compiler error:

Error 1 Command line error D8016 : '/MT' and '/clr' command-line options
are incompatible cl stasm

What I did before the whole mess occured was that I added a WindowsForm.
The IDE asked me if I wanted to convert my project to support CLR
support. I said yes, because I didn't know it would wreck just
everything up.

Can we say that this is a critical thing to do? Critical meaning that
you have to rewrite a lot of code?
Or is the compiler option "MT" a thing that I can remove without
breaking anything?

Anna
 
Anna said:
Armin,
thanks for your reply. It arrived at the right time because I'm really
desperate.
The error

Error 10 error C2857: '#include' statement specified with the
/Ycstdafx.h command-line option was not found in the source file
C:\Programs\Microsoft Visual Studio
9.0\VC\atlmfc\include\atlsimpstr.h 288 VideoASM

is thrown in

C:\Programs\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlsimpstr.h

This means it's a MS thing, and I am not sure if I should type
#include "stdafx.h" into it.
Well, I did, and then +100 compiler errors were thrown in

Error 1 error C2504: 'CDialog' : base class undefined
C:\Programs\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxdlgs.h
108 VideoASM

So I guess it's not correct how I did it.
Can you help?

Well, atlsimpstr.h is a header file. If the compiler is calling it a source
file then your project compile settings are wrong. There shouldn't be any
Microsoft files listed in your Solution Explorer at all, they get pulled in
with #include statements and never compiled separately.
 
Anna Smidt said:
Armin,
thanks for your reply. It arrived at the right time because I'm really
desperate.
The error

Error 10 error C2857: '#include' statement specified with the /Ycstdafx.h
command-line option was not found in the source file C:\Programs\Microsoft
Visual Studio 9.0\VC\atlmfc\include\atlsimpstr.h 288 VideoASM

is thrown in

C:\Programs\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlsimpstr.h

This means it's a MS thing, and I am not sure if I should type #include
"stdafx.h" into it.
Well, I did, and then +100 compiler errors were thrown in

Error 1 error C2504: 'CDialog' : base class undefined
C:\Programs\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxdlgs.h 108
VideoASM

So I guess it's not correct how I did it.
Can you help?

Damn, I'm really desperate. Maybe it's because I worked all done on the
same problem, but I want to get it going.
Anna

I would never change the supplied header files. I'd include stdafx.h in the
cpp file in your own project. To narrow the problem down, you can compile on
a per file basis by pressing Ctrl+F7 (cpp files only! not header files)


Armin
 
Anna Smidt said:
Can we say that the main problem is this compiler error:

Error 1 Command line error D8016 : '/MT' and '/clr' command-line options
are incompatible cl stasm

What I did before the whole mess occured was that I added a WindowsForm.
The IDE asked me if I wanted to convert my project to support CLR
support. I said yes, because I didn't know it would wreck just
everything up.

Can we say that this is a critical thing to do? Critical meaning that
you have to rewrite a lot of code?
Or is the compiler option "MT" a thing that I can remove without
breaking anything?

Maybe this helps:
http://msdn.microsoft.com/en-us/library/x0w2664k.aspx
("How To: Migrate to /clr" etc)


Armin
 
Back
Top