You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Heitor Barbieri <ba...@bireme.ops-oms.org> on 2002/11/27 14:56:58 UTC

link problem

 I am trying to build a dll that uses xalan functions, but when MSVC 
tries to link it complains about
linking the xalan's static member functions. How can I solve it ?

See the output:

Linking...
Ak_XPath.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: static void __stdcall 
XPathEvaluator::initialize(void)" (__imp_?initialize@XPathEvaluator@@SGXXZ)
Ak_XPath.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: static void __stdcall 
XMLPlatformUtils::Initialize(void)" 
(__imp_?Initialize@XMLPlatformUtils@@SGXXZ)
Ak_XPath.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: static void __stdcall 
XMLPlatformUtils::Terminate(void)" 
(__imp_?Terminate@XMLPlatformUtils@@SGXXZ)
Ak_XPath.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: static void __stdcall 
XPathEvaluator::terminate(void)" (__imp_?terminate@XPathEvaluator@@SGXXZ)
DOMTreeErrorReporter.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: static char * __stdcall 
XMLString::transcode(unsigned short const * const)" 
(__imp_?transcode@XMLString@@SGPADQBG@Z)
Debug/AktoxSL.dll : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.


Best regards

 Heitor Barbieri
 


Re: link problem

Posted by wo...@gmx.de.
Oops, sorry, after re-reading your mail, I realized, that NOT all missing
symbols are from xerces...

There was a thread about linking in the last couple of days about which
libraries to link against and how and where to specify the needed libraries: see
http://marc.theaimsgroup.com/?l=xalan-c-users&r=1&b=200211&w=2

Hope that helps

Wolfgang

-- 
Wolfgang Schell
wolfgang.schell@gmx.de

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


Re: link problem

Posted by Heitor Barbieri <ba...@bireme.ops-oms.org>.
Dear Wolfgang,

Unfortunatelly, the xerces library is present in my project.
I even use some other function of it. The problem seems to be only with 
the static member functions.

Heitor

wolfgang.schell@gmx.de wrote:

>> I am trying to build a dll that uses xalan functions, but when MSVC 
>>tries to link it complains about
>>linking the xalan's static member functions. How can I solve it ?
>>    
>>
>
>It seems that the missing symbols are all from xerces. So you probably
>forgot to link against the xerces library.
>
>Hope that helps
>
>Wolfgang
>
>  
>



Re: link problem

Posted by wo...@gmx.de.
>  I am trying to build a dll that uses xalan functions, but when MSVC 
> tries to link it complains about
> linking the xalan's static member functions. How can I solve it ?

It seems that the missing symbols are all from xerces. So you probably
forgot to link against the xerces library.

Hope that helps

Wolfgang

-- 
Wolfgang Schell
wolfgang.schell@gmx.de

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


Re: link problem

Posted by Heitor Barbieri <ba...@bireme.ops-oms.org>.
Dear David,

 Congratulations! You solved my problem.

 Thank you very much.

Heitor Barbieri

David N Bertoni/Cambridge/IBM wrote:

>
>
>There is no way Xalan or Xerces functions should have __stdcall linkage.  I
>suspect you have modified your project settings so that everything is
>__stdcall.   You cannot do this when you use Xalan and Xerces.
>
>Select "Settings..." from the project menu.  Click on C/C++ and then select
>"Code Generation" from the category drop-down.  Change the "Calling
>convention:" drop-down from __stdcall to the __cdecl, which is the default.
>
>If you have functions in your DLL that you want as __stdcall, use
>__declspec to do that -- don't change the project settings.
>
>Dave
>
>
>
>                                                                                                                                          
>                      Heitor Barbieri                                                                                                     
>                      <barbieri@bireme.o         To:      xalan-c-users@xml.apache.org                                                    
>                      ps-oms.org>                cc:      (bcc: David N Bertoni/Cambridge/IBM)                                            
>                                                 Subject: link problem                                                                    
>                      11/27/2002 05:56                                                                                                    
>                      AM                                                                                                                  
>                                                                                                                                          
>
>
>
> I am trying to build a dll that uses xalan functions, but when MSVC
>tries to link it complains about
>linking the xalan's static member functions. How can I solve it ?
>
>See the output:
>
>Linking...
>Ak_XPath.obj : error LNK2001: unresolved external symbol
>"__declspec(dllimport) public: static void __stdcall
>XPathEvaluator::initialize(void)" (__imp_?initialize@XPathEvaluator@@SGXXZ)
>Ak_XPath.obj : error LNK2001: unresolved external symbol
>"__declspec(dllimport) public: static void __stdcall
>XMLPlatformUtils::Initialize(void)"
>(__imp_?Initialize@XMLPlatformUtils@@SGXXZ)
>Ak_XPath.obj : error LNK2001: unresolved external symbol
>"__declspec(dllimport) public: static void __stdcall
>XMLPlatformUtils::Terminate(void)"
>(__imp_?Terminate@XMLPlatformUtils@@SGXXZ)
>Ak_XPath.obj : error LNK2001: unresolved external symbol
>"__declspec(dllimport) public: static void __stdcall
>XPathEvaluator::terminate(void)" (__imp_?terminate@XPathEvaluator@@SGXXZ)
>DOMTreeErrorReporter.obj : error LNK2001: unresolved external symbol
>"__declspec(dllimport) public: static char * __stdcall
>XMLString::transcode(unsigned short const * const)"
>(__imp_?transcode@XMLString@@SGPADQBG@Z)
>Debug/AktoxSL.dll : fatal error LNK1120: 5 unresolved externals
>Error executing link.exe.
>
>
>Best regards
>
> Heitor Barbieri
>
>
>
>  
>



Re: link problem

Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.



There is no way Xalan or Xerces functions should have __stdcall linkage.  I
suspect you have modified your project settings so that everything is
__stdcall.   You cannot do this when you use Xalan and Xerces.

Select "Settings..." from the project menu.  Click on C/C++ and then select
"Code Generation" from the category drop-down.  Change the "Calling
convention:" drop-down from __stdcall to the __cdecl, which is the default.

If you have functions in your DLL that you want as __stdcall, use
__declspec to do that -- don't change the project settings.

Dave



                                                                                                                                          
                      Heitor Barbieri                                                                                                     
                      <barbieri@bireme.o         To:      xalan-c-users@xml.apache.org                                                    
                      ps-oms.org>                cc:      (bcc: David N Bertoni/Cambridge/IBM)                                            
                                                 Subject: link problem                                                                    
                      11/27/2002 05:56                                                                                                    
                      AM                                                                                                                  
                                                                                                                                          



 I am trying to build a dll that uses xalan functions, but when MSVC
tries to link it complains about
linking the xalan's static member functions. How can I solve it ?

See the output:

Linking...
Ak_XPath.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __stdcall
XPathEvaluator::initialize(void)" (__imp_?initialize@XPathEvaluator@@SGXXZ)
Ak_XPath.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __stdcall
XMLPlatformUtils::Initialize(void)"
(__imp_?Initialize@XMLPlatformUtils@@SGXXZ)
Ak_XPath.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __stdcall
XMLPlatformUtils::Terminate(void)"
(__imp_?Terminate@XMLPlatformUtils@@SGXXZ)
Ak_XPath.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __stdcall
XPathEvaluator::terminate(void)" (__imp_?terminate@XPathEvaluator@@SGXXZ)
DOMTreeErrorReporter.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static char * __stdcall
XMLString::transcode(unsigned short const * const)"
(__imp_?transcode@XMLString@@SGPADQBG@Z)
Debug/AktoxSL.dll : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.


Best regards

 Heitor Barbieri