Author Topic: Link errors  (Read 7565 times)

sethjackson

  • Guest
Link errors
« on: November 09, 2005, 10:08:39 pm »
Hi I keep getting link errors with wxWidgets 2.6.2 built with

I have the static library. No dll's and a monolithic lib.

Here are my link options.

<Add library="wxmsw26"/>
<Add library="wxzlib"/>
<Add library="comctl32"/>
<Add library="gdi32"/>
<Add libary="ole32"/>

Errors:

Code
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_droptgt.o):droptgt.cpp:(.data+0x0): undefined reference to `IID_IUnknown'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_droptgt.o):droptgt.cpp:(.data+0x4): undefined reference to `IID_IDropTarget'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_filename.o):filename.cpp:(.text+0x1827): undefined reference to `IID_IPersistFile'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x2faf): undefined reference to `XML_ParserCreate'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x308c): undefined reference to `XML_SetUserData'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x30ac): undefined reference to `XML_SetElementHandler'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x30c3): undefined reference to `XML_SetCharacterDataHandler'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x30da): undefined reference to `XML_SetCommentHandler'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x30f1): undefined reference to `XML_SetDefaultHandler'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x310e): undefined reference to `XML_SetUnknownEncodingHandler'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x3184): undefined reference to `XML_Parse'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x3221): undefined reference to `XML_ParserFree'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x343e): undefined reference to `XML_GetErrorCode'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x3446): undefined reference to `XML_ErrorString'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x34ac): undefined reference to `XML_GetCurrentLineNumber'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_oleutils.o):oleutils.cpp:(.text$_ZNK13wxBasicString3GetEv[wxBasicString::Get() const]+0xf): undefined reference to `SysAllocString@4'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_dataobj.o):dataobj.cpp:(.data+0x0): undefined reference to `IID_IUnknown'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_dataobj.o):dataobj.cpp:(.data+0x4): undefined reference to `IID_IDataObject'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_dataobj.o):dataobj.cpp:(.data+0x8): undefined reference to `IID_IUnknown'
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_dataobj.o):dataobj.cpp:(.data+0xc): undefined reference to `IID_IEnumFORMATETC'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 19 seconds)


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Link errors
« Reply #1 on: November 09, 2005, 10:24:01 pm »
C:\wxWidgets-2.6.2\lib\gcc_lib/libwxmsw26.a(monolib_xml.o):xml.cpp:(.text+0x2faf): undefined reference to `XML_ParserCreate'
The XML stuff seems to origin from a missing expat library (ftp://ftp.jclark.com/pub/xml/). Are you sure that you have considered all dependencies of your project? What are you trying to compile?

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Link errors
« Reply #2 on: November 09, 2005, 10:28:32 pm »
You need to link against uuid too (for the remaining errors)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: Link errors
« Reply #3 on: November 09, 2005, 10:52:04 pm »
Thanks guys it works now. :)