I am getting a linker error while trying to use libcurl in Embarcadero C++ Builder XE:
[ILINK32 Error] Error: 'C:...\CURL-7.52.1\BUILD\WIN32\VC8\DLL RELEASE\LIBCURL.LIB' contains invalid OMF record, type 0x21 (possibly COFF)
I have built the curl-7.52.1 library in Visual Studio 2005.
I am able to get libcurl.dll and libcurl.lib after building.
I tried a sample project in VS 2005 and I am able to execute it.
But I want to use libcurl in C++Builder instead.
If I use the same library built in VS 2005 in my C++Builder project, it is giving me the linker error.
Can you please help me? How can I use the libcurl library in my C++Builder project?
C++Builder's
.libfile format (OMF) is different from MS Visual Studio's format (COFF). You should be able to make a compatible.libfile from the DLL using C++Builder'sIMPLIBcommand-line utility:And then add this
LIBCURL_BCB.LIBfile to your project instead of the.libfile you got when compilinglibcurlin VC++.The
-aswitch is used to generate underscores for__cdeclfunctions.On my computer, I have only C++Builder 5, and its
implib.exeis found in this folder: