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 mredding <MR...@wmsgaming.com> on 2006/09/14 17:41:26 UTC
Unresolved external symbols (Win XP, VS 2005 Express)
Hello All,
I am trying to build a sample application as listed here under
http://xml.apache.org/xerces-c/program-dom.html "XercesDOMParser -
Constructing a XercesDOMParser" on Windows XP using Visual Studio Express
2005. Unfortunatly, I am getting 31 unresolved externals. As an example:
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport)
public: static char * __cdecl xercesc_2_7::XMLString::transcode(wchar_t
const * const)" (__imp_?transcode@XMLString@xercesc_2_7@@SAPADQB_W@Z)
referenced in function __catch$_main$0 main.obj
Now mind you, "XMLPlatformUtils::Initialize();" and
"XMLPlatformUtils::Terminate();" link and work just fine. There was an
example program http://xml.apache.org/xerces-c/program.html here that
demonstrates the initialize and shutdown of Xerces. The only addition to
the project was linking the "xerces-c_2.lib" library.
Before hand, I downloaded xerces-c-windows_2000-msvc_60.zip. I then added
C:\xerces-c-windows_2000-msvc_60\bin to my PATH. Further, I added
"C:\xerces-c-windows_2000-msvc_60\bin",
"C:\xerces-c-windows_2000-msvc_60\Include", and
"C:\xerces-c-windows_2000-msvc_60\lib" to my "executable", "include", and
"library" properties in VS. I also added the libraries "xerces-c_2.lib" and
"xerces-depdom_2.lib" to my project. The project is using the \MTd
multithreading switch.
I attempted to add XERCES_STATIC_LIBRARY to my preprocessor as I had read in
an older thread, but to no avail. I beleive Xerces uses ATL, so I also
staticly linked those in the project as well, to no avail (I know this
wasn't going to fix the problem, but I'm getting a little disparate).
So I'm running out of ideas. I'm rolling through the *.hpp files looking
for a hint, but a helpful suggestion would be much appreciated.
Thanks in advance.
--
View this message in context: http://www.nabble.com/Unresolved-external-symbols-%28Win-XP%2C-VS-2005-Express%29-tf2272422.html#a6308614
Sent from the Xerces - C - Dev forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Re: Unresolved external symbols (Win XP, VS 2005 Express)
Posted by mredding <MR...@wmsgaming.com>.
SOB. That fixed it. I would never have even thought of that.
Thank you.
David Bertoni wrote:
>
> mredding wrote:
>> Hello All,
>>
>> I am trying to build a sample application as listed here under
>> http://xml.apache.org/xerces-c/program-dom.html "XercesDOMParser -
>> Constructing a XercesDOMParser" on Windows XP using Visual Studio
>> Express
>> 2005. Unfortunatly, I am getting 31 unresolved externals. As an
>> example:
>>
>> Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport)
>> public: static char * __cdecl xercesc_2_7::XMLString::transcode(wchar_t
>> const * const)" (__imp_?transcode@XMLString@xercesc_2_7@@SAPADQB_W@Z)
>> referenced in function __catch$_main$0 main.obj
>>
>
> ...
>
>>
>> So I'm running out of ideas. I'm rolling through the *.hpp files looking
>> for a hint, but a helpful suggestion would be much appreciated.
>
> You need to make sure the setting for wchar_t matches in both Xerces-C and
> your project. This has been answered before:
>
> http://marc.theaimsgroup.com/?l=xerces-c-users&m=112835153406147&w=2
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Unresolved-external-symbols-%28Win-XP%2C-VS-2005-Express%29-tf2272422.html#a6309129
Sent from the Xerces - C - Dev forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Re: Unresolved external symbols (Win XP, VS 2005 Express)
Posted by David Bertoni <db...@apache.org>.
mredding wrote:
> Hello All,
>
> I am trying to build a sample application as listed here under
> http://xml.apache.org/xerces-c/program-dom.html "XercesDOMParser -
> Constructing a XercesDOMParser" on Windows XP using Visual Studio Express
> 2005. Unfortunatly, I am getting 31 unresolved externals. As an example:
>
> Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport)
> public: static char * __cdecl xercesc_2_7::XMLString::transcode(wchar_t
> const * const)" (__imp_?transcode@XMLString@xercesc_2_7@@SAPADQB_W@Z)
> referenced in function __catch$_main$0 main.obj
>
...
>
> So I'm running out of ideas. I'm rolling through the *.hpp files looking
> for a hint, but a helpful suggestion would be much appreciated.
You need to make sure the setting for wchar_t matches in both Xerces-C and
your project. This has been answered before:
http://marc.theaimsgroup.com/?l=xerces-c-users&m=112835153406147&w=2
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org