9,898,421 members (43,846 online)
Member 1517609
148
Sign out
home
articles
quick answers
discussions
features
community
help
Search for articles, questions, tips
Next
Articles » Platforms, Frameworks & Libraries » Libraries » Code Libraries
Article
Browse Code
Stats
Revisions (2)
Alternatives
Comments &
Discussions (21)
How to Build libiconv with Microsoft Visual Studio
By
PARK Youngho,
21 Dec 2011
4.38 (11 votes)
About Article
The GNU library libiconv
does not provide the way to
build the library with
Microsoft Visual Studio
now. But, I want to share
my way to do so
Type
Licence
First Posted
Views
Article
LGPL3
18 Dec 2011
15,756
3,724
26 times
Download source - 1.13 MB
Download demo - 5.36 MB
Add your own
alternative version
Introduction
L b c n
is one of the most useful and famous libraries that converts texts between encodings and has been
iiov
developed under GNU projects. However, now it does not provide the way to build it with Microsoft Visual Studio but
with gcc. Before, it had provided but now stopped explaining how to build it with Microsoft Visual Studio. However,
many of the computer programmers are using Microsoft Visual Studio and want to build
l b c n
with Microsoft
iiov
Visual Studio. So, this article is about how to build
l b c n
with Microsoft Visual Studio. If you can build
iiov
l b c n
with Microsoft Visual Studio, you will be able to change various compilation options and build it in order
iiov
to optimize
l b c n
according to your preference and needs.
iiov
Downloads
Bookmarked
C++ Windows
Intermediate
Background
If you have no idea about
l b c n
, you can refer to it
here
or you can Google for it. You may be confused with
iiov
i o v
and
l b c n
.
I o v
is the executable program that uses
l b c n
while
l b c n
is the library for
cn
iiov cn
iiov
iiov
converting text strings between two different encodings. This article is related to
l b c n
. However, this article is
iiov
not about
l b c n
but about how to build
l b c n
with Microsoft Visual Studio. The GNU library
l b c n
is
iiov
iiov
iiov
under LGPL license. So, you have to be really careful when you use
l b c n
for your commercial use or when you
iiov
don't want to publicize your source code. About LPGL license, you can refer
here.
How to Get the Source Code of libiconv
At the moment, the most recent version of
l b c n
is 1.14. You can download the source code of
l b c n
1.14
iiov
iiov
here
and
here.
Of course, you can get the older versions of
l b c n
here.
iiov
How to Build
I am going to explain the case of Microsoft Visual Studio 2010 professional edition but the explanation can be applied
to the earlier versions of Microsoft Visual Studio and to the express edition of each of them.
First Step
You download the most recent version of
l b c n
which is 1.14 from
here
or
here.
And unzip the downloaded file
iiov
"libiconv-1.14.tar.gz" on your certain folder.
Second Step
You run your Microsoft Visual Studio. Then, you make a new
W N 2
project. Let's say "
l b c n
" as the project
I3
iiov
name. Check to create directory for solution. Choose DLL as the application type and check Empty project for
additional options. Click the button "finish" to generate the new project.
Top News
Old Japanese Man Creates
Amazing Art Using Excel
(Wait, Excel?)
Get the
Insider News
free each
morning.
Related Videos
Visual
C# 2012: Build & Build
Configurations
Introducing Visual Studio
LightSwitch
Related Articles
XML Visualizer v.2
Building Boost libraries for
Visual Studio
A Generic List and Dictionary
Debugger Visualizer for VS.NET
Generate Automated Builds for
Source Code from Multiple
Branches using Team
Foundation Server and Team
Builds
How to Configure TFS Server to
Build Solutions v.2008 and
v.2010 Side by Side on the Same
Machine
Whidbey to Everett Project
Converter (Visual Studio 2005 to
Visual Studio 2003)
Solution Build Timer for VS2005
Syntax Colouring for VBScript in
Visual Studio 6
Converting VS2010 Solution to
VS2008
Load Balancing between Team
Build Agents in Team
Foundation Server 2008
Fast Solution Build Add-in for
Visual Studio .NET
How to invoke Visual Studio
from the Windows Explorer
Shell
How to Install VSCMDShell in
Visual Studio 2005
Windows Mobile App
Development Part 1: Creating
your first application
Introduction to Pocket PC
Development
Zeta Color Visualizer
Driver Wizard
Lessons learned migrating to
Visual Studio 2012 and .NET 4.5
GCCFilter - A script for
compiling with GCC in Visual
Studio
Using the Rebase utility in
project makefile
Third Step
Now, you have to copy some files from the folders generated by unzipping "libiconv-1.14.tar.gz" to the project
folders. To build "
l b c n
", you need to compile three files "localcharset.c", "relocatable.c" and "iconv.c". That is the
iiov
key idea!
Copy three files "relocatable.h", "relocatable.c" and "iconv.c" in the folder "...\libiconv-1.14\lib\" to the project folder
"...\libiconv\libiconv\".
Copy "...\libiconv-1.14\libcharset\lib\localcharset.c" to the project folder "...\libiconv\libiconv\".
Copy "...\libiconv-1.14\libcharset\include\localcharset.h.build.in" to the project folder "...\libiconv\libiconv\" and
then, rename the copied "localcharset.h.build.in" to "localcharset.h.
Copy "...\libiconv-1.14\windows\libiconv.rc" to the project folder "...\libiconv\libiconv\".
Make folder "include" under the project folder "...\libiconv\" so to make "...\libiconv\include".
Copy "...\libiconv-1.14\include\iconv.h.build.in" to the project include folder "...\libiconv\include" and then, rename
the copied "iconv.h.build.in" to "iconv.h".
Copy "...\libiconv-1.14\config.h.in" to the project include folder "...\libiconv\include" and then, rename the copied
"config.h.in" to "config.h".
And then, copy all the header files (*.h) and definition files (*.def) in the folder "...\libiconv-1.14\lib" to the project
include folder "...\libiconv\include".
Fourth Step
Now, you have to add existing items to the project "
l b c n
" that we made at the second step. Execute "project >
iiov
Add Existing items..." at the main menu to add existing items to the project.
评论