Mixed mode dll

A

Asfar

I am having an error when compiling an C++/CLI application. This application
uses a dll MFC extended dll.

The error message is
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:\Program Files\Microsoft Visual Studio
8\VC\atlmfc\include\afx.h 24

Can someone tell how to go about his?

Thanks,
-Asfar
 
B

Bruno van Dooren

I am having an error when compiling an C++/CLI application. This
application uses a dll MFC extended dll.

The error message is
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:\Program Files\Microsoft Visual Studio
8\VC\atlmfc\include\afx.h 24

in you project properties, change the 'Use of MFC' to MFC in a shared dll.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
A

Asfar

I changed the project properties to use MFC in a shared dll for the C++/CLI
application. This was orignally set to Use Standard Windows Libraries.
It now gives a series of errors.
error C2872: 'FILETIME' : ambiguous symbol C:\Program Files\Microsoft Visual
Studio 8\VC\PlatformSDK\include\winbase.h 3496



Bruno van Dooren said:
I am having an error when compiling an C++/CLI application. This
application uses a dll MFC extended dll.

The error message is
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:\Program Files\Microsoft Visual Studio
8\VC\atlmfc\include\afx.h 24

in you project properties, change the 'Use of MFC' to MFC in a shared
dll.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
B

Bruno van Dooren

I changed the project properties to use MFC in a shared dll for the C++/CLI
application. This was orignally set to Use Standard Windows Libraries.
It now gives a series of errors.
error C2872: 'FILETIME' : ambiguous symbol C:\Program Files\Microsoft
Visual Studio 8\VC\PlatformSDK\include\winbase.h 3496

Was your app an MFC app? or was it a regular app using an MFC dll? In that
case it is the dll that has to be compiled with MFC in a shared dll.

If your app was an MFC app i find it strange that it was set to use standard
windows libraries.
could you describe the situation with some more detail?

If you can make a small reproduction project you can mail it to me and I
will look at it.
My email address is below. do not forget to 'unmangle' it :)

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 

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

Top