I have a project that relies on libiconv for several operations.
I used the precompiled binaries for iconv.lib for Visual Studio 2008, but now I had to switch to Visual Studio 2010 and there were no more precompiled binaries.
I decided to compile it myself, but as the libiconv documentation libiconv , there is no official support for MSVC compilers. However, I read somewhere that gcc can generate static libraries that were binary compatible with MSVC compilers if the binary interface remains in C Although it sounded crazy, I tried, and it almost worked.
I compiled it, renamed libiconv.a to iconv.lib and tried to link it. (If this is a bad idea, let me know).
First I ran into a link error:
1>iconv.lib(iconv.o) : error LNK2001: unresolved external symbol ___chkstk
After some research, I recompiled libiconv (on both versions of x86 and x64) by adding the -static-libgcc .
This worked, but only for my x64 version. An x86 release always fails with the same error.
What should I do to make this work?
ereOn source share