Note that there are some explanatory texts on larger screens.

plurals
  1. POC++ linker options for DLL (DEF, LIB, etc)
    primarykey
    data
    text
    <p>I have downloaded a library for the purposes of writing a program that can uncompress a RAR file. (<a href="http://www.rarlab.com/rar/UnRARDLL.exe" rel="nofollow noreferrer">http://www.rarlab.com/rar/UnRARDLL.exe</a>) This supplies me with <em>unrar.dll</em>, <em>unrar.h</em>, <em>unrar.lib</em> and <em>UnRDLL.def</em>. I have copied the C example code and have tried compiling it with both Dev-Cpp and Eclipse. </p> <p>I don't have much experience using DLLs, so I don't know how to deal with the following linker errors:</p> <blockquote> <p>UnRDLL.o(.text+0x151):UnRDLL.c: undefined reference to <code>RAROpenArchiveEx@4' UnRDLL.o(.text+0x1c0):UnRDLL.c: undefined reference to</code>RARSetCallback@12' UnRDLL.o(.text+0x1e2):UnRDLL.c: undefined reference to <code>RARReadHeader@8' UnRDLL.o(.text+0x2b9):UnRDLL.c: undefined reference to</code>RARProcessFile@16' UnRDLL.o(.text+0x2fe):UnRDLL.c: undefined reference to <code>RARCloseArchive@4' UnRDLL.o(.text+0x366):UnRDLL.c: undefined reference to</code>RAROpenArchiveEx@4' UnRDLL.o(.text+0x3d6):UnRDLL.c: undefined reference to <code>RARSetCallback@12' UnRDLL.o(.text+0x41c):UnRDLL.c: undefined reference to</code>RARReadHeaderEx@8' UnRDLL.o(.text+0x4c2):UnRDLL.c: undefined reference to <code>RARProcessFile@16' UnRDLL.o(.text+0x4fa):UnRDLL.c: undefined reference to</code>RARCloseArchive@4'</p> </blockquote> <p>Google suggested adding <em>--def UnRDLL.def</em> and <em>-lunrar</em> to the linker options and also copying the .lib file to the Dev-Cpp\lib directory. </p> <p>Can you please explain to me what I'm doing wrong? If possible, tell me what files need to be in the source code directory, what needs to be with libraries, what needs to be added to the project and what linker options there need to be, as well as anything else I've totally missed.</p> <p><strong>EDIT: I don't know why, but I just manually redid all the settings as described above and now it works. Thanks for your help anyway.</strong> </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload