[Expat-discuss] Linking error

abhishek.v at tcs.com abhishek.v at tcs.com
Wed Nov 28 12:53:48 CET 2007


Hi Nick

As per ur suggestion i have included the repective obj files in the 
project now. And now i m getting the following error.

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\graphml\Makefile.win"
Executing  make...
make.exe -f "C:\Dev-Cpp\graphml\Makefile.win" all
g++.exe -D__DEBUG__ main.o 
../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o  -o 
"graphml.exe" -L"C:/Dev-Cpp/lib" -L"C:/SRLGrp/BoostLib/expat-2.0.1/lib" 
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj 
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmlparse.obj 
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmlrole.obj 
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmltok.obj 
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmltok_impl.obj 
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmltok_ns.obj 
../../SRLGrp/BoostLib/expat-2.0.1/win32/bin/Debug/libexpat.lib  -lgmon -pg 
 -g3 

Info: resolving __iob by linking to __imp___iob (auto-import)
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj(.text[_main]+0x0): 
In function `main':
c:\srlgrp\boostlib: multiple definition of `main'
main.o(.text+0x10a):C:/Dev-Cpp/graphml/main.cpp:7: first defined here
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj(.debug$S+0x37d):C:\SRLGrp\BoostLib: 
variable '_iob' can't be auto-imported. Please read the documentation for 
ld's --enable-auto-import for details.
../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj(.text[_main]+0xf3): 
In function `main':
c:\srlgrp\boostlib:13: variable '_iob' can't be auto-imported. Please read 
the documentation for ld's --enable-auto-import for details.
Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-editandcontinue ' unrecognized

Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-editandcontinue ' unrecognized
Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-editandcontinue ' unrecognized
Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-editandcontinue ' unrecognized
Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized

Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-editandcontinue ' unrecognized
Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-editandcontinue ' unrecognized
fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
fu000002.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to `_nm___iob'
collect2: ld returned 1 exit status

make.exe: *** [graphml.exe] Error 1

Execution terminated


Kindly help...



Thanks
Abhishek Vyas

"Nick MacDonald" <nickmacd at gmail.com> wrote on 11/27/2007 09:21:01 PM:

> I know nothing about the add on Boost libraries you're trying to
> compile, but it almost looks to me, from your error messages, that you
> either didn't compile the eXpat library, or include a reference to the
> compiled code into the Boost Makefile, so when the linker is looking
> to resolve for eXpat externals its not finding anything.  I would
> expect to see some sort of explicit reference to eXpat on your linking
> command line, which I don't believe is there.
> 
> I'd almost expect something like -L {dir containing expat} -l expat
> (if you had an expat.a) somewhere, or else an explicit mention of the
> three expat *.o files...  xmltok.o xmlrole.o and xmlparse.o
> 
> But the first step would be to confirm you have compiled eXpat and
> have any of its .o or .a files available in the directories mentioned
> in your Makefile.
> 
> Good luck,
>   Nick
> 
> 
> On Nov 27, 2007 6:04 AM,  <abhishek.v at tcs.com> wrote:
> > I m using graphml.cpp and graphml.hpp of boost lib which make use of 
expat
> > .
> > I m working on Windows-Xp so i have downloaded expat and also 
extracted it
> > to a
> > particular location. when trying to compile the program i m getting
> > following linking error.
> >
> > make.exe -f "C:\Dev-Cpp\graphml\Makefile.win" all
> > g++.exe -D__DEBUG__ -c main.cpp -o main.o
> > -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
> > -I"C:/Dev-Cpp/include/c++/3.4.2/backward"
> > -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" 
-I"C:/Dev-Cpp/include/c++/3.4.2"
> >  -I"C:/Dev-Cpp/include"  -I"C:/Dev-Cpp/graphml"
> > -I"C:/SRLGrp/BoostLib/expat-2.0.1/lib" 
-I"C:/SRLGrp/BoostLib/boost_1_34_1"
> >  -I"C:/SRLGrp/BoostLib/expat-2.0.1"    -pg -g3
> >
> > g++.exe -D__DEBUG__ -c
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp -o
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o
> > -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
> > -I"C:/Dev-Cpp/include/c++/3.4.2/backward"
> > -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" 
-I"C:/Dev-Cpp/include/c++/3.4.2"
> >  -I"C:/Dev-Cpp/include"  -I"C:/Dev-Cpp/graphml"
> > -I"C:/SRLGrp/BoostLib/expat-2.0.1/lib" 
-I"C:/SRLGrp/BoostLib/boost_1_34_1"
> >  -I"C:/SRLGrp/BoostLib/expat-2.0.1"    -pg -g3
> >
> > g++.exe -D__DEBUG__ main.o
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o  -o
> > "graphml.exe" -L"C:/Dev-Cpp/lib"  -lgmon -pg  -g3
> >
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char> >&)]+0x73): In function
> > `ZN5boost22undirected_graph_errorD0Ev':
> > C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: undefined
> > reference to `XML_ParserCreateNS'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char>
> > >&)]+0x91):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp:
> > undefined reference to `XML_SetElementHandler'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char>
> > >&)]+0xa4):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp:
> > undefined reference to `XML_SetCharacterDataHandler'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char>
> > >&)]+0xb6):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp:
> > undefined reference to `XML_SetUserData'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char> >&)]+0x12b): In function
> > `ZN5boost12read_graphmlERSiRNS_12mutate_graphE':
> > C:/Dev-Cpp/graphml/../..
> /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:349:
> > undefined reference to `XML_Parse'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char>
> > >&)]+0x1af):C:/Dev-Cpp/graphml/../..
> /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351:
> > undefined reference to `XML_GetCurrentColumnNumber'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char>
> > >&)]+0x1c0):C:/Dev-Cpp/graphml/../..
> /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351:
> > undefined reference to `XML_GetCurrentLineNumber'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char>
> > >&)]+0x1d1):C:/Dev-Cpp/graphml/../..
> /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351:
> > undefined reference to `XML_GetErrorCode'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char>
> > >&)]+0x1d9):C:/Dev-Cpp/graphml/../..
> /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351:
> > undefined reference to `XML_ErrorString'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char> >&)]+0x259): In function
> > `Z41__static_initialization_and_destruction_0ii':
> > C:/Dev-Cpp/include/c++/3.4.2/iostream:77: undefined reference to
> > `XML_ParserFree'
> > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.
> 
text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream<char,
> > std::char_traits<char> >&)]+0x3c9): In function
> > `GLOBAL__D__ZN5boost12read_graphmlERSiRNS_12mutate_graphE':
> > C:/Dev-Cpp/graphml/../..
> /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:355:
> > undefined reference to `XML_ParserFree'
> > collect2: ld returned 1 exit status

> ForwardSourceID:NT0004D0CE 
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




More information about the Expat-discuss mailing list