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 "Straub, Corey" <cs...@agi.com> on 2007/11/14 21:32:29 UTC

unresolved external symbol

Hi,
            I am new to this so if this the wrong place to send this
sorry and could you let me know where I should send this.
 
I am trying to update xalan and xerces.  I have no problems updating
xalan but when I try to update xerces I am having an issue.
 
I am going from xerces 2.1 to 2.7 and also I am using VC8.
 
I know there was no project made for VC8 but I updated the VC7.1 project
to 8 and it compiled fine.
 
When I try to use the new library file in the program I keep getting an
unresolved external symbol error which suggest that something is not
linked right but I checked the library file against the function and I
find it
in the lib file and they are the exact same.
 
Here is the error I get:
 
AgMemBufInputSource.obj : error LNK2001: unresolved external symbol
"public: static class xercesc_2_7::MemoryManager *
xercesc_2_7::XMLPlatformUtils::fgMemoryManager"
(?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
AgXercesXMLParser.obj : error LNK2001: unresolved external symbol
"public: static class xercesc_2_7::MemoryManager *
xercesc_2_7::XMLPlatformUtils::fgMemoryManager"
(?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
AgXercesXMLParser.obj : error LNK2001: unresolved external symbol
"public: static char const * const
xercesc_2_7::XMLUni::fgXercescDefaultLocale"
(?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)
 
 
If I change 2 lines in my code as follows then I get 2 of the errors to
go away:
 
XMLPlatformUtils::Initialize(); changed to
//XMLPlatformUtils::Initialize();
 
SAXParser parser(0,0);
 
Then I am left with this error:
 
AgMemBufInputSource.obj : error LNK2001: unresolved external symbol
"public: static class xercesc_2_7::MemoryManager *
xercesc_2_7::XMLPlatformUtils::fgMemoryManager"
(?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
 
If anyone has any ideas why I am getting this or how to fix it, help
would be appreciated and if not thank you for taking time to look at
this
 
            -Corey
 

RE: unresolved external symbol

Posted by "Straub, Corey" <cs...@agi.com>.
I tried removing the .ncb and .suo intermediate files but I still get
the error.  I tried to create a map file but either because the project
will not fully compile or because I changed the setting incorrectly when
the map file is created it is empty, its size is 0kb. To create the map
file I went under the project properties -> linker -> debugging and set
Generate map File to yes, gave a map file name, and set Map Exports to
yes.

-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org] 
Sent: Tuesday, November 20, 2007 7:47 PM
To: c-dev@xerces.apache.org
Subject: Re: unresolved external symbol

Straub, Corey wrote:
>  When I did the dumpbin before I used the /ALL to get all the data on
> the files and when I searched the txt file I used this: 
> 
> ?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> 
> ?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB
> 
> Is that the mangled name I was supposed to search for?
> 
> I removed the directories and provided the explicit path with the same
> results, I when I get time tomorrow I will try making the mapfile and
> see if that shines any light on the situation.
> 
> Thanks for the help
Another thing you might try to to delete your .ncb and .suo intermediate

files.  I remember something like this happening on VC6 in certain 
circumstances.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: unresolved external symbol

Posted by David Bertoni <db...@apache.org>.
Straub, Corey wrote:
>  When I did the dumpbin before I used the /ALL to get all the data on
> the files and when I searched the txt file I used this: 
> 
> ?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A
> 
> ?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB
> 
> Is that the mangled name I was supposed to search for?
> 
> I removed the directories and provided the explicit path with the same
> results, I when I get time tomorrow I will try making the mapfile and
> see if that shines any light on the situation.
> 
> Thanks for the help
Another thing you might try to to delete your .ncb and .suo intermediate 
files.  I remember something like this happening on VC6 in certain 
circumstances.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: unresolved external symbol

Posted by "Straub, Corey" <cs...@agi.com>.
 When I did the dumpbin before I used the /ALL to get all the data on
the files and when I searched the txt file I used this: 

?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A

?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB

Is that the mangled name I was supposed to search for?

I removed the directories and provided the explicit path with the same
results, I when I get time tomorrow I will try making the mapfile and
see if that shines any light on the situation.

Thanks for the help

	-Corey

-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org] 
Sent: Tuesday, November 20, 2007 3:53 PM
To: c-dev@xerces.apache.org
Subject: Re: unresolved external symbol

Straub, Corey wrote:
> When I do a dumpbin on the implib(AgSreamFmt.lib) I don't find the
> symbols but when I do a dumpbin on the xerces-c_2D.lib I find both the
> symbols from my errors
You would have to do a dumpbin /imports on your implib to find the
symbol.

If you did find the symbol in xerces-d_2D.lib, then something is very
wrong 
with your build environment, or you're hitting a compiler/linker bug.
Are 
you sure you searched for the mangled names for the two data members?

You might also try removing any extra directories you're providing to
the 
build environment, then provide the explicit path to the Xerces-C implib
as 
an input to the linker.  You might also try creating a mapfile when you 
link.  There may be some additional clues in the mapfile that indicate
why 
the link is failing.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: unresolved external symbol

Posted by David Bertoni <db...@apache.org>.
Straub, Corey wrote:
> When I do a dumpbin on the implib(AgSreamFmt.lib) I don't find the
> symbols but when I do a dumpbin on the xerces-c_2D.lib I find both the
> symbols from my errors
You would have to do a dumpbin /imports on your implib to find the symbol.

If you did find the symbol in xerces-d_2D.lib, then something is very wrong 
with your build environment, or you're hitting a compiler/linker bug.  Are 
you sure you searched for the mangled names for the two data members?

You might also try removing any extra directories you're providing to the 
build environment, then provide the explicit path to the Xerces-C implib as 
an input to the linker.  You might also try creating a mapfile when you 
link.  There may be some additional clues in the mapfile that indicate why 
the link is failing.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: unresolved external symbol

Posted by "Straub, Corey" <cs...@agi.com>.
When I do a dumpbin on the implib(AgSreamFmt.lib) I don't find the
symbols but when I do a dumpbin on the xerces-c_2D.lib I find both the
symbols from my errors

-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org] 
Sent: Tuesday, November 20, 2007 2:13 PM
To: c-dev@xerces.apache.org
Subject: Re: unresolved external symbol

Straub, Corey wrote:
> Well if I remove the library file from where I added to the project
from
> and try to compile I get this error:
> 
> LINK : fatal error LNK1181: cannot open input file
> '..\..\lib\Debug.NET\xerces-c_2D.lib'
> 
> So unless it is present I cannot compile the program and I thought
there
> might be a similar problem so I tried compiling with the command line
> looking as follows:
> 
> /OUT:"../../bin/Debug.NET/AgStreamFmt.dll" /INCREMENTAL:NO /NOLOGO
> /LIBPATH:"../../lib/Debug.NET/" /DLL /MANIFEST
>
/MANIFESTFILE:".\..\..\lib\Debug.NET\AgStreamFmt\AgStreamFmt.dll.interme
> diate.manifest" /DEBUG /PDB:"..\..\bin\Debug.NET\AgStreamFmt.pdb"
> /IMPLIB:".\..\..\lib\Debug.NET/AgStreamFmt.lib" /MACHINE:X86
> /ERRORREPORT:PROMPT xerces-c_2D.lib
> 
> but it yields the same results as before, I am stuck with the one
error
> I cannot get rid of.

I suggest you do run dumpbin /exports on the implib in that directory
and 
redirect the output to a file.  Then, open that file in notepad and
search 
for the missing symbol.  If it's not there, there is a problem with your

Xerces-C build.  The implib from my local build of Xerces-C 2.7 _does_ 
contain the two missing symbols.

There may be some significance to the fact that the two missing symbols
are 
static data members, and not functions.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: unresolved external symbol

Posted by David Bertoni <db...@apache.org>.
Straub, Corey wrote:
> Well if I remove the library file from where I added to the project from
> and try to compile I get this error:
> 
> LINK : fatal error LNK1181: cannot open input file
> '..\..\lib\Debug.NET\xerces-c_2D.lib'
> 
> So unless it is present I cannot compile the program and I thought there
> might be a similar problem so I tried compiling with the command line
> looking as follows:
> 
> /OUT:"../../bin/Debug.NET/AgStreamFmt.dll" /INCREMENTAL:NO /NOLOGO
> /LIBPATH:"../../lib/Debug.NET/" /DLL /MANIFEST
> /MANIFESTFILE:".\..\..\lib\Debug.NET\AgStreamFmt\AgStreamFmt.dll.interme
> diate.manifest" /DEBUG /PDB:"..\..\bin\Debug.NET\AgStreamFmt.pdb"
> /IMPLIB:".\..\..\lib\Debug.NET/AgStreamFmt.lib" /MACHINE:X86
> /ERRORREPORT:PROMPT xerces-c_2D.lib
> 
> but it yields the same results as before, I am stuck with the one error
> I cannot get rid of.

I suggest you do run dumpbin /exports on the implib in that directory and 
redirect the output to a file.  Then, open that file in notepad and search 
for the missing symbol.  If it's not there, there is a problem with your 
Xerces-C build.  The implib from my local build of Xerces-C 2.7 _does_ 
contain the two missing symbols.

There may be some significance to the fact that the two missing symbols are 
static data members, and not functions.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: unresolved external symbol

Posted by "Straub, Corey" <cs...@agi.com>.
Well if I remove the library file from where I added to the project from
and try to compile I get this error:

LINK : fatal error LNK1181: cannot open input file
'..\..\lib\Debug.NET\xerces-c_2D.lib'

So unless it is present I cannot compile the program and I thought there
might be a similar problem so I tried compiling with the command line
looking as follows:

/OUT:"../../bin/Debug.NET/AgStreamFmt.dll" /INCREMENTAL:NO /NOLOGO
/LIBPATH:"../../lib/Debug.NET/" /DLL /MANIFEST
/MANIFESTFILE:".\..\..\lib\Debug.NET\AgStreamFmt\AgStreamFmt.dll.interme
diate.manifest" /DEBUG /PDB:"..\..\bin\Debug.NET\AgStreamFmt.pdb"
/IMPLIB:".\..\..\lib\Debug.NET/AgStreamFmt.lib" /MACHINE:X86
/ERRORREPORT:PROMPT xerces-c_2D.lib

but it yields the same results as before, I am stuck with the one error
I cannot get rid of.


-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org] 
Sent: Tuesday, November 20, 2007 1:37 PM
To: c-dev@xerces.apache.org
Subject: Re: unresolved external symbol

Straub, Corey wrote:
> Hi Alberto,
> 
> Here is what is in the command line:
> 
> /OUT:"../../bin/Debug.NET/AgStreamFmt.dll" /INCREMENTAL:NO /NOLOGO
/DLL
> /MANIFEST
>
/MANIFESTFILE:".\..\..\lib\Debug.NET\AgStreamFmt\AgStreamFmt.dll.interme
> diate.manifest" /DEBUG /PDB:"..\..\bin\Debug.NET\AgStreamFmt.pdb"
> /IMPLIB:".\..\..\lib\Debug.NET/AgStreamFmt.lib" /MACHINE:X86
> /ERRORREPORT:PROMPT
> 
> also in the additional options section it has:
> 
> /IGNORE:4222
> 
> 
> another note is about how the xerces lib files are included, instead
of
> being in the project properties there is a libraries folder with a
debug
> and release folder where the libraries are, I double check and the
debug
> is being used when in debug and release is used when I am in release.
> 
> If you need any other settings let me know.
I'm surprised that xerces-c_2D.lib doesn't appear in the command line. 
Also, there are no LIBPATH directories, which I would expect if you're 
specifying certain folders for the Xerces-C implib.

For reference, here is a linker command line from one of the Xerces-C
samples:

/OUT:".\..\..\..\..\..\Build\Win32\VC8\Debug\StdInParse.exe"
/INCREMENTAL 
/NOLOGO /LIBPATH:".\..\..\..\..\..\Build\Win32\VC8\Debug" /MANIFEST 
/MANIFESTFILE:".\..\..\..\..\..\Build\Win32\VC8\Debug\obj\StdInParse\Std
InParse.exe.intermediate.manifest" 
/DEBUG /PDB:".\..\..\..\..\..\Build\Win32\VC8\Debug\StdInParse.pdb" 
/SUBSYSTEM:CONSOLE /ERRORREPORT:PROMPT xerces-c_3D.lib  kernel32.lib 
user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib 
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Are you using some other dependency mechanism?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: unresolved external symbol

Posted by David Bertoni <db...@apache.org>.
Straub, Corey wrote:
> Hi Alberto,
> 
> Here is what is in the command line:
> 
> /OUT:"../../bin/Debug.NET/AgStreamFmt.dll" /INCREMENTAL:NO /NOLOGO /DLL
> /MANIFEST
> /MANIFESTFILE:".\..\..\lib\Debug.NET\AgStreamFmt\AgStreamFmt.dll.interme
> diate.manifest" /DEBUG /PDB:"..\..\bin\Debug.NET\AgStreamFmt.pdb"
> /IMPLIB:".\..\..\lib\Debug.NET/AgStreamFmt.lib" /MACHINE:X86
> /ERRORREPORT:PROMPT
> 
> also in the additional options section it has:
> 
> /IGNORE:4222
> 
> 
> another note is about how the xerces lib files are included, instead of
> being in the project properties there is a libraries folder with a debug
> and release folder where the libraries are, I double check and the debug
> is being used when in debug and release is used when I am in release.
> 
> If you need any other settings let me know.
I'm surprised that xerces-c_2D.lib doesn't appear in the command line. 
Also, there are no LIBPATH directories, which I would expect if you're 
specifying certain folders for the Xerces-C implib.

For reference, here is a linker command line from one of the Xerces-C samples:

/OUT:".\..\..\..\..\..\Build\Win32\VC8\Debug\StdInParse.exe" /INCREMENTAL 
/NOLOGO /LIBPATH:".\..\..\..\..\..\Build\Win32\VC8\Debug" /MANIFEST 
/MANIFESTFILE:".\..\..\..\..\..\Build\Win32\VC8\Debug\obj\StdInParse\StdInParse.exe.intermediate.manifest" 
/DEBUG /PDB:".\..\..\..\..\..\Build\Win32\VC8\Debug\StdInParse.pdb" 
/SUBSYSTEM:CONSOLE /ERRORREPORT:PROMPT xerces-c_3D.lib  kernel32.lib 
user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib 
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Are you using some other dependency mechanism?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: unresolved external symbol

Posted by "Straub, Corey" <cs...@agi.com>.
Hi Alberto,

Here is what is in the command line:

/OUT:"../../bin/Debug.NET/AgStreamFmt.dll" /INCREMENTAL:NO /NOLOGO /DLL
/MANIFEST
/MANIFESTFILE:".\..\..\lib\Debug.NET\AgStreamFmt\AgStreamFmt.dll.interme
diate.manifest" /DEBUG /PDB:"..\..\bin\Debug.NET\AgStreamFmt.pdb"
/IMPLIB:".\..\..\lib\Debug.NET/AgStreamFmt.lib" /MACHINE:X86
/ERRORREPORT:PROMPT

also in the additional options section it has:

/IGNORE:4222


another note is about how the xerces lib files are included, instead of
being in the project properties there is a libraries folder with a debug
and release folder where the libraries are, I double check and the debug
is being used when in debug and release is used when I am in release.

If you need any other settings let me know.

Thanks

	-Corey

-----Original Message-----
From: Alberto Massari [mailto:amassari@datadirect.com] 
Sent: Tuesday, November 20, 2007 2:19 AM
To: c-dev@xerces.apache.org
Subject: Re: unresolved external symbol

Hi Corey,
it looks like you are not finding up the global variables exported by 
Xerces; could you post the command line used by the linker? (Project 
properties -> Linker -> Command Line)

Thanks,
Alberto

Straub, Corey wrote:
> Hi Alberto,
> Well the way the program is setup there is a folder that holds all of
> the xerces files so when I was try to move to 2.7 I removed all of the
> old files and backed them up then put the new xerces files where the
old
> ones were.  So my program is using the 2.7, I checked the paths and
they
> are looking there, and I doubled checked that they are the 2.7 files.
>
> I did manage to fix one of my problems though, I changed
>
> XMLPlatformUtils::Initialize(); changed to  
> XMLPlatformUtils::Initialize("en_US");
>
> Now I don't get the below error
>
> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol
> "public: static char const * const
> xercesc_2_7::XMLUni::fgXercescDefaultLocale"
> (?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)
>
> And if I change 
>
> SAXParser parser; to SAXParser parser(0,0,0);
>
> I am left with that one error still,
> It seems to be a problem with XMLPlatformUtils::fgMemoryManager, I
think
> it has to do with the Class I have AgMemBufInputSource because it is
> based off of InputSource which when is constructed needs a
> XMLPlatformUtils::fgMemoryManager passed to it.
>
> How would I construct one properly or what should I pass into the
> constructor for the memory manager, I was looking through the samples
> and could not find a good example.
>
> Thanks for the help.
>
> 	-Corey
>
> -----Original Message-----
> From: Alberto Massari [mailto:amassari@datadirect.com] 
> Sent: Thursday, November 15, 2007 2:37 AM
> To: c-dev@xerces.apache.org
> Subject: Re: unresolved external symbol
>
> Hi Corey,
> have you checked if you changed the library path to include the 2.7 
> directory instead of the 2.1?
>
> Alberto
>
> Straub, Corey wrote:
>   
>> Hi,
>>
>>             I am new to this so if this the wrong place to send this 
>> sorry and could you let me know where I should send this.
>>
>>  
>>
>> I am trying to update xalan and xerces.  I have no problems updating 
>> xalan but when I try to update xerces I am having an issue.
>>
>>  
>>
>> I am going from xerces 2.1 to 2.7 and also I am using VC8.
>>
>>  
>>
>> I know there was no project made for VC8 but I updated the VC7.1 
>> project to 8 and it compiled fine.
>>
>>  
>>
>> When I try to use the new library file in the program I keep getting 
>> an unresolved external symbol error which suggest that something is 
>> not linked right but I checked the library file against the function 
>> and I find it
>>
>> in the lib file and they are the exact same.
>>
>>  
>>
>> Here is the error I get:
>>
>>  
>>
>> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
>> "public: static class xercesc_2_7::MemoryManager * 
>> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
>>
(?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>>
>> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
>> "public: static class xercesc_2_7::MemoryManager * 
>> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
>>
(?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>>
>> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
>> "public: static char const * const 
>> xercesc_2_7::XMLUni::fgXercescDefaultLocale" 
>> (?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)
>>
>>  
>>
>>  
>>
>> If I change 2 lines in my code as follows then I get 2 of the errors 
>> to go away:
>>
>>  
>>
>> XMLPlatformUtils::Initialize(); changed to  
>> //XMLPlatformUtils::Initialize();
>>
>>  
>>
>> SAXParser parser(0,0);
>>
>>  
>>
>> Then I am left with this error:
>>
>>  
>>
>> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
>> "public: static class xercesc_2_7::MemoryManager * 
>> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
>>
(?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>>
>>  
>>
>> If anyone has any ideas why I am getting this or how to fix it, help 
>> would be appreciated and if not thank you for taking time to look at
>>     
> this
>   
>>  
>>
>>             -Corey
>>
>>  
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: unresolved external symbol

Posted by Alberto Massari <am...@datadirect.com>.
Hi Corey,
it looks like you are not finding up the global variables exported by 
Xerces; could you post the command line used by the linker? (Project 
properties -> Linker -> Command Line)

Thanks,
Alberto

Straub, Corey wrote:
> Hi Alberto,
> Well the way the program is setup there is a folder that holds all of
> the xerces files so when I was try to move to 2.7 I removed all of the
> old files and backed them up then put the new xerces files where the old
> ones were.  So my program is using the 2.7, I checked the paths and they
> are looking there, and I doubled checked that they are the 2.7 files.
>
> I did manage to fix one of my problems though, I changed
>
> XMLPlatformUtils::Initialize(); changed to  
> XMLPlatformUtils::Initialize("en_US");
>
> Now I don't get the below error
>
> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol
> "public: static char const * const
> xercesc_2_7::XMLUni::fgXercescDefaultLocale"
> (?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)
>
> And if I change 
>
> SAXParser parser; to SAXParser parser(0,0,0);
>
> I am left with that one error still,
> It seems to be a problem with XMLPlatformUtils::fgMemoryManager, I think
> it has to do with the Class I have AgMemBufInputSource because it is
> based off of InputSource which when is constructed needs a
> XMLPlatformUtils::fgMemoryManager passed to it.
>
> How would I construct one properly or what should I pass into the
> constructor for the memory manager, I was looking through the samples
> and could not find a good example.
>
> Thanks for the help.
>
> 	-Corey
>
> -----Original Message-----
> From: Alberto Massari [mailto:amassari@datadirect.com] 
> Sent: Thursday, November 15, 2007 2:37 AM
> To: c-dev@xerces.apache.org
> Subject: Re: unresolved external symbol
>
> Hi Corey,
> have you checked if you changed the library path to include the 2.7 
> directory instead of the 2.1?
>
> Alberto
>
> Straub, Corey wrote:
>   
>> Hi,
>>
>>             I am new to this so if this the wrong place to send this 
>> sorry and could you let me know where I should send this.
>>
>>  
>>
>> I am trying to update xalan and xerces.  I have no problems updating 
>> xalan but when I try to update xerces I am having an issue.
>>
>>  
>>
>> I am going from xerces 2.1 to 2.7 and also I am using VC8.
>>
>>  
>>
>> I know there was no project made for VC8 but I updated the VC7.1 
>> project to 8 and it compiled fine.
>>
>>  
>>
>> When I try to use the new library file in the program I keep getting 
>> an unresolved external symbol error which suggest that something is 
>> not linked right but I checked the library file against the function 
>> and I find it
>>
>> in the lib file and they are the exact same.
>>
>>  
>>
>> Here is the error I get:
>>
>>  
>>
>> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
>> "public: static class xercesc_2_7::MemoryManager * 
>> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
>> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>>
>> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
>> "public: static class xercesc_2_7::MemoryManager * 
>> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
>> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>>
>> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
>> "public: static char const * const 
>> xercesc_2_7::XMLUni::fgXercescDefaultLocale" 
>> (?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)
>>
>>  
>>
>>  
>>
>> If I change 2 lines in my code as follows then I get 2 of the errors 
>> to go away:
>>
>>  
>>
>> XMLPlatformUtils::Initialize(); changed to  
>> //XMLPlatformUtils::Initialize();
>>
>>  
>>
>> SAXParser parser(0,0);
>>
>>  
>>
>> Then I am left with this error:
>>
>>  
>>
>> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
>> "public: static class xercesc_2_7::MemoryManager * 
>> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
>> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>>
>>  
>>
>> If anyone has any ideas why I am getting this or how to fix it, help 
>> would be appreciated and if not thank you for taking time to look at
>>     
> this
>   
>>  
>>
>>             -Corey
>>
>>  
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: unresolved external symbol

Posted by "Straub, Corey" <cs...@agi.com>.
Hi Alberto,
Well the way the program is setup there is a folder that holds all of
the xerces files so when I was try to move to 2.7 I removed all of the
old files and backed them up then put the new xerces files where the old
ones were.  So my program is using the 2.7, I checked the paths and they
are looking there, and I doubled checked that they are the 2.7 files.

I did manage to fix one of my problems though, I changed

XMLPlatformUtils::Initialize(); changed to  
XMLPlatformUtils::Initialize("en_US");

Now I don't get the below error

AgXercesXMLParser.obj : error LNK2001: unresolved external symbol
"public: static char const * const
xercesc_2_7::XMLUni::fgXercescDefaultLocale"
(?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)

And if I change 

SAXParser parser; to SAXParser parser(0,0,0);

I am left with that one error still,
It seems to be a problem with XMLPlatformUtils::fgMemoryManager, I think
it has to do with the Class I have AgMemBufInputSource because it is
based off of InputSource which when is constructed needs a
XMLPlatformUtils::fgMemoryManager passed to it.

How would I construct one properly or what should I pass into the
constructor for the memory manager, I was looking through the samples
and could not find a good example.

Thanks for the help.

	-Corey

-----Original Message-----
From: Alberto Massari [mailto:amassari@datadirect.com] 
Sent: Thursday, November 15, 2007 2:37 AM
To: c-dev@xerces.apache.org
Subject: Re: unresolved external symbol

Hi Corey,
have you checked if you changed the library path to include the 2.7 
directory instead of the 2.1?

Alberto

Straub, Corey wrote:
>
> Hi,
>
>             I am new to this so if this the wrong place to send this 
> sorry and could you let me know where I should send this.
>
>  
>
> I am trying to update xalan and xerces.  I have no problems updating 
> xalan but when I try to update xerces I am having an issue.
>
>  
>
> I am going from xerces 2.1 to 2.7 and also I am using VC8.
>
>  
>
> I know there was no project made for VC8 but I updated the VC7.1 
> project to 8 and it compiled fine.
>
>  
>
> When I try to use the new library file in the program I keep getting 
> an unresolved external symbol error which suggest that something is 
> not linked right but I checked the library file against the function 
> and I find it
>
> in the lib file and they are the exact same.
>
>  
>
> Here is the error I get:
>
>  
>
> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
> "public: static class xercesc_2_7::MemoryManager * 
> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>
> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
> "public: static class xercesc_2_7::MemoryManager * 
> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>
> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
> "public: static char const * const 
> xercesc_2_7::XMLUni::fgXercescDefaultLocale" 
> (?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)
>
>  
>
>  
>
> If I change 2 lines in my code as follows then I get 2 of the errors 
> to go away:
>
>  
>
> XMLPlatformUtils::Initialize(); changed to  
> //XMLPlatformUtils::Initialize();
>
>  
>
> SAXParser parser(0,0);
>
>  
>
> Then I am left with this error:
>
>  
>
> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
> "public: static class xercesc_2_7::MemoryManager * 
> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>
>  
>
> If anyone has any ideas why I am getting this or how to fix it, help 
> would be appreciated and if not thank you for taking time to look at
this
>
>  
>
>             -Corey
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: unresolved external symbol

Posted by Alberto Massari <am...@datadirect.com>.
Hi Corey,
have you checked if you changed the library path to include the 2.7 
directory instead of the 2.1?

Alberto

Straub, Corey wrote:
>
> Hi,
>
>             I am new to this so if this the wrong place to send this 
> sorry and could you let me know where I should send this.
>
>  
>
> I am trying to update xalan and xerces.  I have no problems updating 
> xalan but when I try to update xerces I am having an issue.
>
>  
>
> I am going from xerces 2.1 to 2.7 and also I am using VC8.
>
>  
>
> I know there was no project made for VC8 but I updated the VC7.1 
> project to 8 and it compiled fine.
>
>  
>
> When I try to use the new library file in the program I keep getting 
> an unresolved external symbol error which suggest that something is 
> not linked right but I checked the library file against the function 
> and I find it
>
> in the lib file and they are the exact same.
>
>  
>
> Here is the error I get:
>
>  
>
> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
> "public: static class xercesc_2_7::MemoryManager * 
> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>
> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
> "public: static class xercesc_2_7::MemoryManager * 
> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>
> AgXercesXMLParser.obj : error LNK2001: unresolved external symbol 
> "public: static char const * const 
> xercesc_2_7::XMLUni::fgXercescDefaultLocale" 
> (?fgXercescDefaultLocale@XMLUni@xercesc_2_7@@2QBDB)
>
>  
>
>  
>
> If I change 2 lines in my code as follows then I get 2 of the errors 
> to go away:
>
>  
>
> XMLPlatformUtils::Initialize(); changed to  
> //XMLPlatformUtils::Initialize();
>
>  
>
> SAXParser parser(0,0);
>
>  
>
> Then I am left with this error:
>
>  
>
> AgMemBufInputSource.obj : error LNK2001: unresolved external symbol 
> "public: static class xercesc_2_7::MemoryManager * 
> xercesc_2_7::XMLPlatformUtils::fgMemoryManager" 
> (?fgMemoryManager@XMLPlatformUtils@xercesc_2_7@@2PAVMemoryManager@2@A)
>
>  
>
> If anyone has any ideas why I am getting this or how to fix it, help 
> would be appreciated and if not thank you for taking time to look at this
>
>  
>
>             -Corey
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org