Error Linking with IUP toolkit

This is a discussion on Error Linking with IUP toolkit within the C Programming forums, part of the General Programming Boards category; Hi, Been trying to compile a simple C program using the open source IUP toolkit provided by Tecgraf (makers of ...

  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    14

    Error Linking with IUP toolkit

    Hi,

    Been trying to compile a simple C program using the open source IUP toolkit provided by Tecgraf (makers of Lua). Keep getting the error below:

    Based on the documentation the following libraries are dependancies:
    iupwin* -> gdi32 user32 comdlg32 comctl32 ole32 (system - Windows)
    button.o is a sample program provided in the IUP distribution

    Code:
    c:\dev\IUP>make
    gcc -L C:\dev\IUP\libs -o main.exe button.o libiup.a libiupcd.a libiupim.a -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lole32
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x229): undefined reference to `IID_IUnknown'
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x245): undefined reference to `IID_IDropTarget'
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x2a1): undefined reference to `IID_IUnknown'
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x2bd): undefined reference to `IID_IDropSource'
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x319): undefined reference to `IID_IUnknown'
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x335): undefined reference to `IID_IEnumFORMATETC'
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x391): undefined reference to `IID_IUnknown'
    libiup.a(iupwin_dragdrop.o):iupwin_dragdrop.c:(.text+0x3ad): undefined reference to `IID_IDataObject'
    collect2: ld returned 1 exit status
    make: *** [main.exe] Error 1
    Can anyone see the issue here...

  2. #2
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Put the libraries in your library path and then just -liup etc.

    And check that they are in fact linkable libraries with those functions exported.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  3. #3
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    611
    Or you could just add -luuid after -lole32

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking Error
    By dragon_man in forum Windows Programming
    Replies: 2
    Last Post: 06-18-2003, 08:27 PM
  2. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 04:27 AM
  3. Linking error!
    By m712 in forum C++ Programming
    Replies: 2
    Last Post: 12-08-2002, 10:24 PM
  4. Linking error?
    By Jez_Master in forum C++ Programming
    Replies: 2
    Last Post: 04-07-2002, 08:07 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21