You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Fabrice Laborde <fa...@mckesson.fr> on 2005/10/13 14:10:15 UTC
Xalan 1.9 port on Borland C++ Builder 5 : Questions
Hi,
I have develop a DLL under Visual C++, but my exported function are non
compatible with BCB use, so I've to compile
Xalan C++ 1.9 under Borland Builder 5
My first step was to create a AllInOne Project
I've include same files than in MS Visual C++ 6 dsp project ...
Then I've set same pre-compile definitions + WIN32_LEAN_AND_MEAN Def
I've replaced VCPPDefinitions.hpp by a new file : BCBDefintions.hpp
/********************** CONTENT OF BCBDefintion.hpp
********************/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if !defined(BCBDEFINITIONS_HEADER_GUARD_1357924680)
#define BCBDEFINITIONS_HEADER_GUARD_1357924680
#pragma warning(disable: 4127 4251 4511 4512 4514 4702 4710 4711 4786
4097; error: 4150 4172 4238 4239 4715)
//
------------------------------------------------------------------------
---
// A define in the build for each project is also used to control
whether
// the export keyword is from the project's viewpoint or the client's.
// These defines provide the platform specific keywords that they need
// to do this.
//
------------------------------------------------------------------------
---
#define XALAN_PLATFORM_EXPORT __declspec(dllexport)
#define XALAN_PLATFORM_IMPORT __declspec(dllimport)
#define XALAN_PLATFORM_EXPORT_FUNCTION(T) XALAN_PLATFORM_EXPORT T
#define XALAN_PLATFORM_IMPORT_FUNCTION(T) XALAN_PLATFORM_IMPORT T
/*
#if __INTEL_COMPILER >= 600
#define XALAN_INLINE_INITIALIZATION
#elif _MSC_VER >= 1300
#define XALAN_INLINE_INITIALIZATION
#define XALAN_INLINE_INITIALIZATION_IS_DEFINITION_BUG
#define XALAN_NEW_STD_ALLOCATOR
#define XALAN_HAS_STD_ITERATORS
#if _MSC_VER == 1300
#define XALAN_VCPP_USE_PTRIT
#endif
#else
#define XALAN_REQUIRES_QUALIFIED_DESTRUCTOR
#define XALAN_NO_COVARIANT_RETURN_TYPE
#endif
*/
#define XALAN_HAS_STD_ITERATORS
#define XALAN_INLINE_INITIALIZATION
#define XALAN_REQUIRES_QUALIFIED_DESTRUCTOR
#define XALAN_NO_COVARIANT_RETURN_TYPE
#define XALAN_LSTRSUPPORT
#define XALAN_NEWLINE_IS_CRLF
#define XALAN_HAS_CPP_NAMESPACE
#define XALAN_HAS_STD_DISTANCE
#define XALAN_USE_NATIVE_WCHAR_T
#define XALAN_STRICT_ANSI_HEADERS
#endif // BCBDEFINITIONS_HEADER_GUARD_1357924680
/********************** END OF BCBDefintion.hpp ********************/
And I've added a new section into PlatformDefinitions.hpp as follow
#include "TRU64Definitions.hpp"
#elif defined(__INTEL_COMPILER)
#include "IntelDefinitions.hpp"
#elif defined(__BORLANDC__)
#include "BCBDefinitions.hpp"
#else
#error Unknown compiler!
#endif
Now I have to generate the LocalMsgIndex.hpp file / and in same time,
Xalan messages DLL ...
I Just want to get more informations on this project, and the
MsgCreator.exe Util
My aim ( at beginning ) is to be able to compile Xalan with INMEM
options ( I've defined pre-compiled def for this case)
I think , this good way is to create another project such as
Localization ... but I am a little lost
Correct me if I am false , but :
There is in src/Utils , some C++ code :
MsgCreator, which will create an exe file, which take in arg param the
XalanMsg_en_US.xlf file and will produce the LocalMsgIndex.hpp file ? I
think I am ok
The other step is to compile the XalanMessages.dll and lib part, with
the some compile flags ( as I can see in following command line to VC
compiler ... )
cl.exe /nologo /MDd /W4 /Gm /GX /ZI /Od /I "\src" /I "\include" /I
"..\..\..\..\..\src" /I
".\.\..\..\..\..\..\Build\Win32\VC6\Debug\Nls\Include" /D "WIN32" /D
"_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XALANMSGLIB_EXPORTS"
/D "XALAN_XALANM
SGLIB_BUILD_DLL"
/Fo".\.\..\..\..\..\..\Build\Win32\VC6\Debug\Util\XalanMsgLib\\"
/Fd".\.\..\..\..\..\..\Build\Win32\VC6\Debug\Util\XalanMsgLib\\" /FD /GZ
/c ..\..\..\..\..\src\xalanc\Utils\XalanMsgLib\XalanMsgLib.cpp
I need some information on options :
_USRDLL are the DLL export flag? or is the XALANMSGLIB_EXPORTS ? or the
XALAN_XALANMSGLIB_BUILD_DLL ?
What About compile flag.. ?
I see Multithread option on in /MDd...
And other ?
I ask help on compiling flags on BCB IDE
The /Fo <path> and /Fd are output Lib / Dll directory ? or Dll/Lib
directory ? or others ...
Thanks for your help & all comments...
Fabrice