You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/06/20 18:20:33 UTC
DO NOT REPLY [Bug 10065] New: -
xml4com bugs found when porting to Visual Studio .NET project files
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10065>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10065
xml4com bugs found when porting to Visual Studio .NET project files
Summary: xml4com bugs found when porting to Visual Studio .NET
project files
Product: Xerces-C++
Version: Nightly build (please specify the date)
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Miscellaneous
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: rbuck@mathworks.com
When porting Visual Studio 6.0 project files to Visual Studio .NET several
problems were encountered with this particular project.
First, there are files that are deprecated or obselete in the latest version of
visual studio. This problem is associated to only one file: stdafx.cpp. The
corrective action is to change it to:
#if defined(_ATL_STATIC_REGISTRY)
#include <statreg.h>
#if defined(_MSC_VER) && _MSC_VER < 1300
#include <statreg.cpp>
#endif
#endif
#if defined(_MSC_VER) && _MSC_VER < 1300
#include <atlimpl.cpp>
#endif
Secondly, the .def file assigns ordinals to exported functions when it should
not. The warnings look like:
..\..\..\..\..\src\xercesc\com\xml4com.def : warning LNK4222: exported
symbol 'DllCanUnloadNow' should not be assigned an ordinal
..\..\..\..\..\src\xercesc\com\xml4com.def : warning LNK4222: exported
symbol 'DllGetClassObject' should not be assigned an ordinal
..\..\..\..\..\src\xercesc\com\xml4com.def : warning LNK4222: exported
symbol 'DllRegisterServer' should not be assigned an ordinal
..\..\..\..\..\src\xercesc\com\xml4com.def : warning LNK4222: exported
symbol 'DllUnregisterServer' should not be assigned an ordinal
To quote Microsoft MSDN documentation:
------------------------------------------------------------
"These functions are always located by name, using GetProcAddress. The linker
warns about this kind of export is because it could result in a larger image.
This could happen if the range of your ordinal exports is large with relatively
few exports. For example,
EXPORTS
DllGetClassObject @1
MyOtherAPI @100
will require 100 slots in the export address table with 98 of them (2-99) just
filler. On the other hand,
EXPORTS
DllGetClassObject
MyOtherAPI @100
will require two slots. (Be aware that you can also export with the /EXPORT
linker option.)
------------------------------------------------------------
The resolution for this problem is to change the xml4com.def file to the
following:
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org