Generate libiconv static Lib in Windows

Source: Internet
Author: User

The new version of libiconv does not support nmake compilation. You can only use cygwin and other environments to compile libraries such as. dll. La. It seems that there are methods to generate. Lib. Find a Windows version online, libiconv for Windows: http://gnuwin32.sourceforge.net/packages/libiconv.htm download sources. Is 1.9.2 version

Compile the static Library:
Refer to readme. woe32 for compilation. It must be completed in the command line. You can use the version earlier than vc7 for compilation, just as vc6 exists in my computer.
First, set the environment variable of vc6:
In the vc6 installation directory./Microsoft Visual Studio/vc98/bin, run vcvars32.bat.

Then:
Nmake-F makefile. msvc no_nls = 1 mflags =-MD

Generate the dynamic library Lib, and write the DLL method readme. Just add a DLL = 1 parameter.

Problems:
Iconv. Lib (iconv. OBJ): Error lnk2001: unresolved external symbol _ imp_locale_charset
Solution:
The iconv is generated. lib method, we found that the locale_charset function should not be exported in this way, and finally found that it was originally localcharset. h. one macro definition of in does not take effect. libcharset_dll_exported should be empty during static compilation, but it is not defined as null. leave it blank and compile it again.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.