_AFXDLL/_USRDLL #define error
Jon Meltzer/HHP/International Thomson Publishing
Sunday, July 28, 1996
Environment: VC++ 1.52, MFC 2.5, Windows 95
The following is from a developer at my office. Any ideas?
------------------
I'm trying to recompile [an external DLL delivered by a contractor], and I'm
stuck on an odd detail. The DLL was huge, and as I suspected, it was a debug
build. I can re-build it with the debug mode selected in the project options
dialog, and I get a good build with the same large file size (1335k). When I
select release mode, I then get this error on each of the files that are
compiled:
c:\msvc\mfc\include\afxver_.h(87) : error C2189: #error : Please define one of
_AFXDLL or _USRDLL with _WINDLL
I can't figure out where this is supposed to be defined. When I added either
of these to the define symbols list, I
then got lots of link errors.
Will Hapgood - - - Heinle & Heinle
72 West Berlin Road Bolton MA 01740
508-779-0521 or 508-779-0202
whapgood@pobox.com
David.Lowndes@bj.co.uk
Thursday, August 01, 1996
[Mini-digest: 3 responses]
> When I
>select release mode, I then get this error on each of the files that are
>compiled:
>
>c:\msvc\mfc\include\afxver_.h(87) : error C2189: #error : Please define one of
>_AFXDLL or _USRDLL with _WINDLL
>
Will,
I think you've been supplied with a build file that's got different compiler options
for debug & release builds. I can't remember which options you need to alter, but if
you use the VC IDE, Options, Project, Compiler and switch between the Debug
& Release builds for the Memory Model & Windows Proplog/Epilog categories
you will probably be able to spot which options are different and correct the
problem.
Be sure to do a re-build all after the change so that you get the pre-compiled
headers rebuilt.
Dave Lowndes
-----From: "Glenn T. Jayaputera"
You have to define either _AFXDLL or _USRDLL in the project setting. make sure
that you have the same setting (ie either _AFXDLL or _USRDLL) as the debug mode one
hope that helps
glenn tesla
-----From: Elliott Kleinrock
Read Tech note #33.
| Вернуться в корень Архива
|