VC++ ("include" problemand directx,platform SDK

U

untitled

i included the following line to VC++ after i installed the directx
SDK and platform SDK.
#include "DShow.h"

i configured c directories for the include and lib to both directx SDX
and platform SDK.
now just after i added the above line i got this messages:

D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(221) :
error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(222) :
error C3641: 'StringCchCopyW' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(333) :
error C3641: 'StringCbCopyA' : invalid calling convention '__stdcall '
for function compiled with /clr:pure or /clr:safe

actually i got lots of them but i copied-pasted only three.

what is the problem?
 
?

=?ISO-8859-1?Q?Erik_Wikstr=F6m?=

i included the following line to VC++ after i installed the directx
SDK and platform SDK.
#include "DShow.h"

i configured c directories for the include and lib to both directx SDX
and platform SDK.
now just after i added the above line i got this messages:

D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(221) :
error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(222) :
error C3641: 'StringCchCopyW' : invalid calling convention '__stdcall
' for function compiled with /clr:pure or /clr:safe
D:\Program\Microsoft DirectX SDK (April 2007)\Include\strsafe.h(333) :
error C3641: 'StringCbCopyA' : invalid calling convention '__stdcall '
for function compiled with /clr:pure or /clr:safe

actually i got lots of them but i copied-pasted only three.

what is the problem?

Your question is off topic since it does not deal with anything
concerning the C++ language, in the future try a group dedicated to your
platform/library (VC++ and DirectX) for better answers. For some
suggestions of which groups might be right take a look in the FAQ:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9 some
quick searching in the microsoft.public.* groups should give you some
more options.

Back to your question: Your problem is that you have created a managed
project (or changed some options manually) and this have the /clr:pure
or /clr:safe switch passed to the compiler. This means that any code
declared as using the stdcall calling convection (about all C++ code out
there) will not be allowed. Create a new, native project or turn of the
switch and it should work.
 
U

untitled

Your question is off topic since it does not deal with anything
concerning the C++ language, in the future try a group dedicated to your
platform/library (VC++ and DirectX) for better answers. For some
suggestions of which groups might be right take a look in the FAQ:http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9some
quick searching in the microsoft.public.* groups should give you some
more options.

Back to your question: Your problem is that you have created a managed
project (or changed some options manually) and this have the /clr:pure
or /clr:safe switch passed to the compiler. This means that any code
declared as using the stdcall calling convection (about all C++ code out
there) will not be allowed. Create a new, native project or turn of the
switch and it should work.

thanks alot! really appriciate it, here is the link about the walk
through to fix it:
http://msdn2.microsoft.com/en-us/library/ms235211(VS.80).aspx

you saved the day :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,800
Messages
2,569,657
Members
45,417
Latest member
BonitaNile
Top