I'm currently trying to integrate the ZBar library to an application built in C++ Builder (XE6). However, the ZBar library depends on iconv which is not originally available in Windows, so I managed to get a static library of iconv for windows : "libiconvStatic.lib".
Then I tried to import it to my project this way (I'm not sure the first line is necessary though) :
#define USING_STATIC_LIBICONV
#include <iconv.h>
#pragma comment (lib, "libiconvStatic.lib")
The functions from iconv which are called in the file are iconv_open(), iconv() and iconv_close().
I get through the compilation but get an error from the linker :
[ilink64 Error] Fatal : Invalid object file '/72'
I already tried with both 32bits and 64bits versions of the libiconvStatic.lib .
Do you know why the .lib is not recognized and how to solve this problem? Or any other way to make use of iconv in Windows (and C++ Builder) ?
Thank you.
As mentioned in comments: you should build the library with C++Builder directly, as the object file format is different between MSVC and C++Builder.
Alternatively, you could build a dynamic version of the library with MSVC, and just do implib libiconv.lib libiconv.dll to generate a C++Builder compatible library from the DLL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With