[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-c-users
Subject: Building Xercesc with ICU as static Lib.
From: "Frank Kaaijk" <fkaaijk () delftdi ! com>
Date: 2012-04-13 6:48:26
Message-ID: DFCE6A0AAB1DD14D91B50D0CDCE9FC2102AE9FC0 () ddinl01s003 ! delftdi ! local
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
LS,
Currently our app is using Xerces-C as a static library and this works
just fine. But recently the need has risen to use ICU.
I've found the project in the VC9 folder that'll build various version
of Xerces-C (under Visual Studio), but the combination I'd like (with
ICU as static lib) is not there.
Therefore I modified the ICU Debug x64 project (as a test):
- I've changed the output to static lib
- Link with /MTd (instead of /MDd)
- Preprocessor add XERCES_STATIC_LIBRARY
- Preprocessor change XERCES_USE_TRANSCODER_ICU (instead of
XERCES_USE_TRANSCODER_WINDOWS)
- Preprocessor change XERCES_USE_MSGLOADER_INMEMORY (instead of
XERCES_USE_WIN32_MSGLOADER)
I get a library but when linking with our app it's complaining about
unresolved external symbol "public: __cdecl
xercesc_3_1::InMemMsgLoader::InMemMsgLoader
Followed by some other (I guess related) linker errors.
I've also tried to do the same but use the WIN32_MSGLOADER. Result:
1>xerces-c_static_3D.lib(Win32MsgLoader.obj) : error LNK2005: DllMain
already defined in nafxcwd.lib(dllmodul.obj)
Can it be done? Can I create a static Xerces-C library with ICU support?
Or can it only be a DLL?
If it can be done, what are the required preprocessors directives?
Are there other project options to set?
What is the relation between XERCES_USE_TRANSCODER_ICU and
XERCES_USE_MSGLOADER_INMEMORY instead of XERCES_USE_WIN32_MSGLOADER?
I've tried using CygWin, but failed because I can't find the
packageBinaries.pl in the scripts folder as per instruction (
http://xerces.apache.org/xerces-c/build-misc-2.html)
Can you help me out?
Kind regards.
Frank Kaaijk
Software Engineer
Wiltonstraat 41 I 3905 KW Veenendaal I The Netherlands
T +31 318 583 472 F +31 318 583 451 M +31 614 647 066
E fkaaijk@delftdi.com I www.rogan-delft.com
<http://www.rogan-delft.com/>
[Attachment #5 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" \
CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 \
(filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* \
{behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1015498589;
mso-list-type:hybrid;
mso-list-template-ids:-1295200486 684729092 67698691 67698693 67698689 67698691 \
67698693 67698689 67698691 67698693;} @list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal>LS,<o:p></o:p></p><p \
class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Currently our app is using \
Xerces-C as a static library and this works just fine. But recently the need has \
risen to use ICU.<o:p></o:p></p><p class=MsoNormal>I’ve found the project in \
the VC9 folder that’ll build various version of Xerces-C (under Visual Studio), \
but the combination I’d like (with ICU as static lib) is not \
there.<o:p></o:p></p><p class=MsoNormal>Therefore I modified the ICU Debug x64 \
project (as a test):<o:p></o:p></p><p class=MsoListParagraph \
style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span \
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New \
Roman"'> \
</span></span><![endif]>I’ve changed the output to static lib <o:p></o:p></p><p \
class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if \
!supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New \
Roman"'> \
</span></span><![endif]>Link with /MTd (instead of /MDd)<o:p></o:p></p><p \
class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if \
!supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New \
Roman"'> \
</span></span><![endif]>Preprocessor add XERCES_STATIC_LIBRARY<o:p></o:p></p><p \
class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if \
!supportLists]><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New \
Roman"'> \
</span></span><![endif]>Preprocessor change XERCES_USE_TRANSCODER_ICU (instead of \
XERCES_USE_TRANSCODER_WINDOWS)<o:p></o:p></p><p class=MsoListParagraph \
style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span \
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New \
Roman"'> \
</span></span><![endif]>Preprocessor change XERCES_USE_MSGLOADER_INMEMORY (instead of \
XERCES_USE_WIN32_MSGLOADER)<o:p></o:p></p><p class=MsoNormal>I get a library but when \
linking with our app it’s complaining about <span \
style='font-size:8.0pt;font-family:"Courier New"'>unresolved external symbol \
"public: __cdecl xercesc_3_1::InMemMsgLoader::InMemMsgLoader \
</span><o:p></o:p></p><p class=MsoNormal>Followed by some other (I guess related) \
linker errors.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p \
class=MsoNormal>I’ve also tried to do the same but use the WIN32_MSGLOADER. \
Result: <span style='font-size:8.0pt;font-family:"Courier \
New"'>1>xerces-c_static_3D.lib(Win32MsgLoader.obj) : error LNK2005: DllMain \
already defined in nafxcwd.lib(dllmodul.obj)<o:p></o:p></span></p><p \
class=MsoNormal><span style='font-size:8.0pt;font-family:"Courier \
New"'><o:p> </o:p></span></p><p class=MsoNormal>Can it be done? Can I create a \
static Xerces-C library with ICU support? Or can it only be a DLL?<o:p></o:p></p><p \
class=MsoNormal>If it can be done, what are the required preprocessors \
directives?<o:p></o:p></p><p class=MsoNormal>Are there other project options to \
set?<o:p></o:p></p><p class=MsoNormal>What is the relation between \
XERCES_USE_TRANSCODER_ICU and XERCES_USE_MSGLOADER_INMEMORY instead of \
XERCES_USE_WIN32_MSGLOADER?<o:p></o:p></p><p class=MsoNormal>I’ve tried using \
CygWin, but failed because I can’t find the packageBinaries.pl in the scripts \
folder as per instruction (<a \
href="http://xerces.apache.org/xerces-c/build-misc-2.html">http://xerces.apache.org/xerces-c/build-misc-2.html</a>)<o:p></o:p></p><p \
class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Can you help me \
out?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Kind \
regards.<o:p></o:p></p><p class=MsoNormal><span \
style='font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p \
class=MsoNormal><!--[if gte vml 1]><v:shapetype id="_x0000_t75" \
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" \
filled="f" stroked="f"> <v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="Picture_x0020_0" o:spid="_x0000_s1026" type="#_x0000_t75" \
alt="Signature_Rogan-Delft.png" \
style='position:absolute;margin-left:-.75pt;margin-top:.55pt;width:255pt;height:142.5pt;z-index:-1;visibility:visible'>
<v:imagedata src="cid:image002.png@01CD1801.D1C9CE30" \
o:title="Signature_Rogan-Delft" /> </v:shape><![endif]--><![if !vml]><span \
style='mso-ignore:vglayout;position:absolute;z-index:-1;margin-left:-1px;margin-top:1px;width:340px;height:190px'><img \
width=340 height=190 src="cid:image002.png@01CD1801.D1C9CE30" \
alt="Signature_Rogan-Delft.png" v:shapes="Picture_x0020_0"></span><![endif]><span \
style='font-size:6.0pt'><o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:6.0pt'> \
<o:p></o:p></span></p><p class=MsoNormal><b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></b></p><p \
class=MsoNormal><b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></b></p><p \
class=MsoNormal><b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></b></p><p \
class=MsoNormal><b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></b></p><p \
class=MsoNormal style='margin-left:45.0pt'><b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'>Frank \
Kaaijk<o:p></o:p></span></b></p><p class=MsoNormal \
style='margin-left:45.0pt'><i><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'>Software \
Engineer<o:p></o:p></span></i></p><p class=MsoNormal \
style='margin-left:45.0pt'><i><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></i></p><p \
class=MsoNormal style='margin-left:45.0pt'><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'>Wiltonstraat \
41 </span><b><span \
style='font-size:7.0pt;font-family:"Arial","sans-serif";color:#E32D21'>I</span></b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'> 3905 KW \
Veenendaal </span><b><span \
style='font-size:7.0pt;font-family:"Arial","sans-serif";color:#E32D21'>I</span></b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'> The \
Netherlands</span><span style='font-size:7.0pt'><o:p></o:p></span></p><p \
class=MsoNormal style='margin-left:45.0pt'><b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif";color:#E52E22'>T</span></b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'> +31 318 583 472 \
<b><span style='color:#E52E22'>F</span></b> +31 318 583 451 \
<b><span style='color:#E52E22'>M</span></b> +31 614 647 \
066<o:p></o:p></span></p><p class=MsoNormal style='margin-left:45.0pt'><b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif";color:#E52E22'>E</span></b><span \
style='font-size:7.0pt;font-family:"Tahoma","sans-serif"'> <a \
href="mailto:fkaaijk@delftdi.com">fkaaijk@delftdi.com</a> <b><span \
style='color:#E52E22'>I</span></b> <a href="http://www.rogan-delft.com/"><span \
style='color:#084EE6'>www.rogan-delft.com</span></a><o:p></o:p></span></p><p \
class=MsoNormal style='margin-left:45.0pt'><span \
style='font-size:6.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p><p \
class=MsoNormal><o:p> </o:p></p><p \
class=MsoNormal><o:p> </o:p></p></div></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic