﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-博采众家之长-文章分类-类库/框架</title><link>http://www.cppblog.com/giant35/category/2201.html</link><description>共同进步</description><language>zh-cn</language><lastBuildDate>Mon, 19 May 2008 17:28:33 GMT</lastBuildDate><pubDate>Mon, 19 May 2008 17:28:33 GMT</pubDate><ttl>60</ttl><item><title>Free C / C++ Libraries, Source Code and Frameworks</title><link>http://www.cppblog.com/giant35/articles/11017.html</link><dc:creator>四海</dc:creator><author>四海</author><pubDate>Tue, 08 Aug 2006 12:16:00 GMT</pubDate><guid>http://www.cppblog.com/giant35/articles/11017.html</guid><wfw:comment>http://www.cppblog.com/giant35/comments/11017.html</wfw:comment><comments>http://www.cppblog.com/giant35/articles/11017.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/giant35/comments/commentRss/11017.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/giant35/services/trackbacks/11017.html</trackback:ping><description><![CDATA[
		<h1>转自：http://www.thefreecountry.com/sourcecode/cpp.shtml<br /></h1>
		<h1>
				<br />
		</h1>
		<h1>Free C / C++ Libraries, Source Code and Frameworks</h1>
		<p>
Here are some C and C++ libraries, DLLs, VCLs, source code, components, modules,
application frameworks, class libraries, source code snippets, and the like, that you can use
with your programs without payment of fees and royalties. Note that some libraries (etc)
listed here may have certain restrictions about its use and/or distribution. Be sure you
read the licence conditions in each package before using them.
</p>
		<p>
A few types of libraries have been moved to their own pages, due to the large number of items
in those categories. Here are some of the other pages containing free libraries on this site:
</p>
		<ul class="listoflinks">
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/compression.shtml" target="_top">Free Compression and Archiving Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/database.shtml" target="_top">Free Database Libraries, SQL Servers, ODBC Drivers, and Tools</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/debugging.shtml" target="_top">Free Debugging Libraries, Memory Leak and Resource Leak Detection, Unit Testing</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/encryption.shtml" target="_top">Free Encryption Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/cpp.shtml#font" target="_top">Free C/C++ Font Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/games.shtml" target="_top">Free Games Programming Libraries and Source Code</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/graphics.shtml" target="_top">Free Graphics, Image Drawing Libraries, 3D Engines, 2D Engines</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/gui.shtml" target="_top">Free GUI Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/mathematics.shtml" target="_top">Free Numerical, Graphs, Statistics and Mathematical Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/sockets.shtml" target="_top">Free Sockets, Winsock, TCP/IP, Internet Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/spellcheckers.shtml" target="_top">Free Spell Checker Libraries and Source Code</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/cpp.shtml#stl" target="_top">Free Standard Template Libraries (C++ STL Libraries)</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/cpp.shtml#threads" target="_top">Free Thread Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/audio.shtml" target="_top">Free Audio, Sound, Music, Digitized Voice Libraries</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/cpp.shtml#miscellaneous" target="_top">All Other Free C/C++ Libraries and Source Code</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/index.shtml" target="_top">Master Index of Free Programming Libraries and Source Code</a>
				</li>
		</ul>
		<h2>Disclaimer</h2>
		<p>
The information provided on this page comes without any warranty whatsoever.
Use it at your own risk. Just because a program, book or service is
listed here or has a good review does not mean that I endorse or
approve of the program or of any of its contents. All the other
standard disclaimers also apply.
</p>
		<h2>
				<a name="font" id="font">Free C/C++ Font Libraries</a>
		</h2>
		<dl>
				<dt>
						<a href="ftp://sunsite.unc.edu/pub/Linux/libs/graphics/">T1Lib - Adobe Type 1 Fonts Library</a>
				</dt>
				<dd>
						<p>
If you want your applications to support Adobe Type 1 fonts, this rasterizing library might be
just what you need. It requires a Unix system. It is implemented independently of X11, so it
might be the solution for those of you who don't want to use the Type 1 rasterizer provided
with X11R5 and later. The source code for the package has a filename like t1lib-*.tar.gz (where * is
replaced by the version number). Latest: There is a
<a href="http://gnuwin32.sourceforge.net/packages/t1lib.htm">Windows port of t1lib</a> available as well.
</p>
				</dd>
				<dt>
						<a href="http://www.freetype.org/">FreeType</a>
				</dt>
				<dd>
						<p>
Heard of True Type? Well, now you can include True Type support in your programs on systems
that do not have True Type support by default. Linux and other OSes are supported.
</p>
				</dd>
		</dl>
		<h2>
				<a name="stl" id="stl">Free Standard Template Libraries (C++ STL Libraries)</a>
		</h2>
		<dl>
				<dt>
						<a href="http://www.stlport.org/">STLport (STL Library)</a>
				</dt>
				<dd>
						<p>
This version of STL (Standard Template Library for C++) is available free of charge from
their website. It is apparently also shipped with the current versions of the
Borland C++ compilers.
</p>
				</dd>
				<dt>
						<a href="http://www.sgi.com/tech/stl/">SGI Standard Template Library (STL)</a>
				</dt>
				<dd>
						<p>
If your compiler does not have a recent Standard Template Library implementation, you might want
to consider this version available free from SGI.
</p>
				</dd>
		</dl>
		<h2>
				<a name="threads" id="threads">Free C/C++ Thread Libraries</a>
		</h2>
		<dl>
				<dt>
						<a href="http://pauillac.inria.fr/%7Exleroy/linuxthreads/">LinuxThreads Library</a>
				</dt>
				<dd>
						<p>
The LinuxThreads library implements Posix 1003.1c threads on (as the name reveals) Linux.
It provides kernel-level threads where scheduling is handled by the Linux kernel. Thus, unlike
user-level thread packages, it can take advantage of multiprocessors.
</p>
				</dd>
				<dt>
						<a href="http://www.informatik.hu-berlin.de/%7Emueller/pthreads/">FSU Pthreads (POSIX Threads)</a>
				</dt>
				<dd>
						<p>
This C library implements POSIX threads on a variety of operating systems, including Linux,
FreeBSD, SCO Unix, Solaris, SunOS and DOS.
</p>
				</dd>
				<dt>
						<a href="http://lin.fsid.cvut.cz/%7Ekra/#QpThread">QpThread</a>
				</dt>
				<dd>
						<p>
QpThread is a C++ framework for threads and Unix signals that operates
on top of POSIX threads. It supports deferred cancellation (through
C++ exceptions), timers, thread pools, etc.
</p>
				</dd>
		</dl>
		<h2>
				<a name="miscellaneous" id="miscellaneous">Other Free C/C++ Libraries</a>
		</h2>
		<dl>
				<dt>
						<a href="http://www-306.ibm.com/software/globalization/icu/">IBM ICU: International Components for Unicode</a>
						<img src="http://www.thefreecountry.com/img/new.gif" alt="New" height="12" width="35" />
				</dt>
				<dd>
						<p>
ICU, or the International Components for Unicode, comprises C/C++ and Java libraries for Unicode support,
internationalisation and globalisation (i8n/g11n). It supports Unicode text handling, full character properties and
character set conversions, with more than 500 codepages, Unicode regular expressions, language sensitive collation
and searching, normalisation (normalization), upper/lowercase, script transliterations, more than 230 locale data,
multi-calendar and time zones, formatting of dates, times, numbers, currencies, messages, etc. If you are
writing an application that requires internationalization and globalization support, and are working with Unicode,
this is something that you should check out. It is licensed under the X License (an open source licence).
Platforms supported include Windows, Linux, AIX, HP-UX, Solaris, etc.
</p>
				</dd>
				<dt>
						<a href="http://www.boost.org/">Boost C++ Libraries</a>
				</dt>
				<dd>
						<p>
This site is a source of "free peer-reviewed portable C++ source libraries" (quoted from the site). There are numerous
libraries available, including libraries for managing date and time, filesystems, iterators, random numbers, regex,
tests, strings, text processing, containers, math and numerics, data structures, memory, parsing, concurrent programming,
algorithms, etc.
</p>
				</dd>
				<dt>
						<a href="http://synesis.com.au/software/stlsoft/">STLSoft</a>
				</dt>
				<dd>
						<p>
STLSoft is a collection of templates in header form that contain numerous
classes and functions for Windows and Unix systems. Included in this library are
ATLSTL (for creating COM components with the Active Template Library), COMSTL
(allows the manipulation of the Component Object Model interfaces and API),
.netSTL (applies STL techniques to the .NET framework), InetSTL (applies the STL
techniques to the Internet APIs), MFCSTL (allows the manipulation of the
Microsoft Foundation Classes or MFC), UNIXSTL (library for programming Unix-type
systems), and WinSTL (allows you to program using the Windows API). The library comes with documentation and works
with numerous compilers including Borland C++, Comeau C/C++, Digital Mars C/C++, GNU gcc, Intel C/C++,
Metrowerks Codewarrior, Microsoft Visual C++, and OpenWatcom. As of version 1.8.1, STLSoft is licensed under the
BSD license.
</p>
				</dd>
				<dt>
						<a href="http://libunicows.sourceforge.net/">libunicows</a>
				</dt>
				<dd>
						<p>
libunicows allows you to write programs that use Unicode on Windows 9x/ME with a compiler other than
<a href="http://www.thefreecountry.com/compilers/cpp.shtml">Microsoft Visual C++</a> (the Microsoft unicows library requires Visual C++).
This library supports (at the time I write this) MinGW, Visual C++ 6, Borland C++, and Watcom (and OpenWatcom) C/C++.
It comes with source code released under the MIT licence.
</p>
				</dd>
				<dt>
						<a href="http://oslib.sourceforge.net/">OSLib</a>
				</dt>
				<dd>
						<p>
OSLib is a C library for programmers writing system software (whether it be embedded software or
even entire operating system kernels). It comprises 4 libraries (the extender library,
the standard C library, the math library and the kernel library).
</p>
				</dd>
				<dt>
						<a href="http://www.pdos.lcs.mit.edu/exo/">MIT Exokernel Operating System</a>
				</dt>
				<dd>
						<p>
The MIT Exokernel Operating System attempts to provide a level of abstraction of hardware
so that you can concentrate on the other aspects of implementing an operating system. It may
be useful to those of you planning to write an operating system.
</p>
				</dd>
				<dt>
						<a href="http://www.cs.utah.edu/flux/oskit/">The OSKit Project (Flux)</a>
				</dt>
				<dd>
						<p>
The OSKit Project is a C framework of 34 components providing a wide variety of facilities that
is useful for people planning to write operating system kernels, servers, boot loaders,
embedded applications and the like. The function libraries provide numerous facilities, including
some common C library services (string, memory, printf, etc), default handlers for traps and
interrupts, kernel support functions such as those that set up and manipulate page tables (etc),
support for multiprocessor systems, POSIX emulation system call libraries, memory management,
threads, synchronization, scheduling, debugging aids, hard disk handling, file system implementations,
device driver implementations (SCSI, IDE, network drivers), video driver implementations, etc.
The portions of OSKit that contain machine-dependent code currently supports Intel x86 and
Digital DNARD (StrongArm SA-110 CPU).
</p>
				</dd>
				<dt>
						<a href="http://www.cs.yorku.ca/%7Eoz/">regex</a>
				</dt>
				<dd>
						<p>
regex is a regular expression parser that is released into the public domain (or so
the site says). It is useful if you want to write a program using regular expressions
but don't want to use the GPL ones that come from the Free Software Foundation.
(The package is somewhere in the middle of the page linked to; just scroll down to find it.)
</p>
				</dd>
				<dt>
						<a href="http://www.cs.yorku.ca/%7Eoz/">glob</a>
				</dt>
				<dd>
						<p>
glob is a parser to handle wildcards (similar to the way that Unix shells parse wildcards).
It is released into the public domain (or so the site says). It is useful if you want to write
a program with globbing facility but don't want to use the GPL ones that come from the
Free Software Foundation.
(The package is somewhere in the middle of the page linked to; just scroll down to find it.)
</p>
				</dd>
				<dt>
						<a href="http://synedit.sourceforge.net/">SynEdit Multi-line Edit Control</a>
				</dt>
				<dd>
						<p>
SynEdit is a multi-line edit control that you can use in your Delphi and Borland C++ Builder
programs. Features include syntax highlighting for a variety of programming languages
and a macro recorder. This is a VCL control that comes with source code.
</p>
				</dd>
				<dt>
						<a href="http://libsigc.sourceforge.net/">libsigc++ Callback Framework for C++</a>
				</dt>
				<dd>
						<p>
libsigc++ has C++ classes that provide you a typesafe callback system. You can define
signals and assign callback functions to those signals. It is licensed under the
GNU Library General Public License (LGPL). It works on platforms with a standards-compliant
C++ compiler, such as those with gcc (see the <a href="http://www.thefreecountry.com/compilers/cpp.shtml">Free C/C++ Compilers</a>
page for gcc). A port for
<a href="http://www.amazon.com/exec/obidos/ASIN/B000089GKV/christopherheng">Microsoft Visual C++</a>
(which does not implement partial specializating) has also
been integrated into the distribution, so the library should also work with that compiler.
</p>
				</dd>
				<dt>
						<a href="http://www.imatix.com/html/sfl/">The Standard Function Library</a>
				</dt>
				<dd>
						<p>
The Standard Function Library, or SFL, contains routines for compression, encryption,
encoding, data type conversion, data output formatting, process control, dates, times, calendars,
symbol tables, linked lists, configuration files, error message files, string manipulation,
searching, Internet socket access, MIME, CGI, SMTP, batch programming, debug tracing,
directory access, environment access, etc. It is designed with portability in mind.
The library is written in ANSI C and is supported on MSDOS, Windows,
OS/2, Linux, AIX, SunOS, HP/UX, Solaris, NetBSD, FreeBSD, SCO OpenServer, Digital Unix, and
OpenVMS. The source code is also available.
</p>
				</dd>
				<dt>
						<a href="http://tidy.sourceforge.net/">HTML Tidy Library Project</a>
				</dt>
				<dd>
						<p>
HTML Tidy is an HTML validation library that comes with source code. It allows you to embed
HTML validation facilities into your application, which may come in handy if you are writing
your own editor.
</p>
				</dd>
				<dt>
						<a href="http://www.zeta.org.au/%7Ejon/STL/views/doc/views.html">Views - C++ Standard Template Library Extension</a>
				</dt>
				<dd>
						<p>
Views extends STL to include domain views, which allows you to simplify your code when you
work with containers.
</p>
				</dd>
				<dt>
						<a href="http://www.gnu.org/software/lightning/lightning.html">GNU Lightning</a>
				</dt>
				<dd>
						<p>
GNU Lightning is a library of routines that allows programs to generate assembly
language code at runtime. It abstracts the target CPU, exposing your program to
a standardized RISC instruction set. The library is supposed to be fast, thus making
it useful if you're developing a Just-In-Time compiler.
</p>
				</dd>
				<dt>
						<a href="http://www.scintilla.org/">Scintilla Edit Control</a>
				</dt>
				<dd>
						<p>
Ever wanted to create your own syntax-highlighting editor? Scintilla is a source code
edit control, similar in concept to Microsoft's RichEdit control, that supports things like
syntax highlighting, code completion and call tips. It also supports things like the use of
proportional fonts, bold, italics, multiple foreground and background colours, and multiple fonts.
The source code is available free, and the licence allows you to use the control in any project,
free or commercial.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/tpapro/">TurboPower Async Professional</a>
				</dt>
				<dd>
						<p>
If you need to add speech to your programs, or enable it to process speech input, TurboPower's
Async Professional provides you an easy access to Microsoft's Speech API (SAPI) allowing you
to integrate voice/speech recognition and speech synthesis in your programs. It also handles the
sending and receiving (as well as viewing and printing) of faxes (and converts BMP, DCX, PCX
and TIF files automatically), alphanumeric and text (GSM/SMS) paging,
high speed file transfers (including the major file transfer protocols like Zmodem and FTP),
IP telephony (audio and video, Voice Over IP or VOIP), Internet communications (Winsock access),
supports ISDN modems, RS-232 and RS-485 standards, and includes an XML-based modem database.
And so on. Like most of the TurboPower tools, this open source toolkit may be used with
Delphi and Borland C++ Builder and ActiveX environments like Microsoft Visual C++ and
Visual Basic. If you use Borland Kylix on Linux, you might want to try the
<a href="http://sourceforge.net/projects/tpaproclx/">TurboPower Async Professional CLX</a>
version.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/tpsystools/">TurboPower SysTools</a>
				</dt>
				<dd>
						<p>
TurboPower SysTools contain numerous utility functions and classes for Borland Delphi and
Borland C++ Builder as well as programming environments that support COM objects (like
Microsoft Visual Basic, Microsoft Visual C++. Among the routines included in this library
are string manipulation routines, date and time math routines, high-speed sorting,
high-precision maths, runtime math expression analyzer,
Microsoft Excel-like finance and statistical routines,
email attachment MIME encoding and decoding, reusable containers (stacks, queues, trees,
deques, hash tables), CRC data integrity checking, 1 dimensional and 2 dimensional (1-D and 2-D)
bar codes, money routines, logging classes, patterns, random number distributions,
text data manipulation and more. SysTools is open source, released by TurboPower under
the Mozilla Public License. It works on Windows systems. There is also a version of
<a href="http://sourceforge.net/projects/tpsystoolskylix/">TurboPower SysTools for Kylix</a>.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/tporpheus/">TurboPower Orpheus</a>
				</dt>
				<dd>
						<p>
TurboPower Orpheus contains over 120 VCL components such as data entry components, data
entry validators, grid for presenting and editing 2 column information, status bars,
progress bars, button and tab styles, reports, countdown and elapsed timer components, etc.
Orpheus is open source, and may be used with development tools that support VCL such
as Borland Delphi and C++Builder.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/tpshellshock/">TurboPower ShellShock</a>
				</dt>
				<dd>
						<p>
ShellShock contains native VCL components that allow your application to integrate with the
Windows shell and Windows explorer. Included in this package are tree views, list views,
combo boxes, enumeration of folder contents, monitoring of shell events, file operations
(copy, delete, move, rename, together with Windows shell animations), drag and drop support,
Windows shortcut creation and inspection, customization of common dialog boxes,
minimization to the system tray, etc. You need to use a development tool that supports
VCL such as Borland C++Builder and Delphi to use this toolkit. ShellShock comes with
source code.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/tponguard/">TurboPower OnGuard</a>
				</dt>
				<dd>
						<p>
If you need to create demo versions of your programs, you might want to check out
TurboPower's OnGuard library. The library provides you the ability to create applications
that are time-limited, feature-limited, limited to a certain number of uses, limited to
a certain number of concurrent network users, etc. Written in Object Pascal, it may be
used in Windows development using tools like Borland C++Builder or Delphi.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/tpessence/">TurboPower Essentials</a>
				</dt>
				<dd>
						<p>
TurboPower Essentials has 13 open source native VCL components that provides drop-down
calendars and calculators, roll-up dialog boxes, 3-D labels, tiled backgrounds, scrolling messages,
menu buttons, etc. You need to use a development tool that supports
VCL such as Borland C++Builder and Delphi to use this toolkit.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/tpvplanit/">TurboPower Visual PlanIt</a>
				</dt>
				<dd>
						<p>
Add time, task and contact management to your applications with Visual PlanIt's synchronized
data-aware VCL components. You can create mult-column Outlook style contact grids; day, week,
month event views, Outlook style task lists, connect-and-go database connectivity, printing,
etc. The components are compatible with Delphi and C++Builder (and presumably any other
development system that supports VCL components).
</p>
				</dd>
				<dt>
						<a href="http://getpot.sourceforge.net/">GetPot</a>
				</dt>
				<dd>
						<p>
GetPot, an anagram of the ubiquitous getopt, allows programs to parse command lines and
simple input files by simply including the header file for the library (the entire library
is apparently in the header file). C++, Java, Ruby and Python versions are currently available.
The library is distributed under the GNU LGPL.
</p>
				</dd>
				<dt>
						<a href="http://mylibc.sourceforge.net/">MyLibC</a>
				</dt>
				<dd>
						<p>
MyLibC is a clone of glibc for Windows. The author wrote this to reduce the size of
executables that resulted when glib was used on Windows. Sources are provided.
</p>
				</dd>
				<dt>
						<a href="http://www.uclibc.org/">uClibc - C Library for Embedded Systems</a>
				</dt>
				<dd>
						<p>
uClibc is a C library for developing embedded Linux systems. It supports shared libraries,
multithreading and runs on standard Linux systems with support for ARM, i386, h8300,
m68k, mips, mipsel, PowerPC, SH, SPARC, and v850 processors.
</p>
				</dd>
				<dt>
						<a href="http://www.gradsoft.com.ua/eng/Products/ToolBox/toolbox.html">GradC++ ToolBox</a>
				</dt>
				<dd>
						<p>
GradC++ ToolBox contains several C++ components dealing with threading, program options,
logging, and initialisation of COBRA services. It comes with an administrative guide,
programmers' guide and sources. The C++ library may be used free of charge for
non-commercial purposes.
</p>
				</dd>
				<dt>
						<a href="http://www2.inf.fh-rhein-sieg.de/%7Eskaise2a/ska/sources.html#io95">IO95: Win95 LFN API Wrapper Library</a>
				</dt>
				<dd>
						<p>
This library has functions which you can call from your MSDOS programs to access the
long filenames (LFN) API found in Windows 95 and above. It thus makes it easy for you to
write long file name (LFN) support. The library contains the POSIX.1 compatible opendir()
functions, DOS findfirst() functions, open() functions, fopen() functions, mk/rm/chdir(),
remove(), unlink(), rename(), getcwd(), getdcwd(), getcurdir(), fullpath(), lfn2sfn(). As you
can see, all the hard work of accessing the API has been done for you - just use the
usual familiar functions (whether Unix or DOS). It requires a Borland compiler to compile
(which you can get it for free, legally - check out our
<a href="http://www.thefreecountry.com/compilers/cpp.shtml" target="_top">Free C/C++ Compilers</a> page).
</p>
				</dd>
				<dt>
						<a href="http://www.accurev.com/free/u2nt/index.htm">U2NT Library: Unix/NT Cross-Platform Library</a>
				</dt>
				<dd>
						<p>
This is a library that eases the work needed to port Unix programs to NT. There aren't many
details on the website about the libraries' capabilities, but you can simply download it
from their site and check it out yourself.
</p>
				</dd>
				<dt>
						<a href="http://www.fastio.com/">ClibPDF PDF Library</a>
				</dt>
				<dd>
						<p>
ClibPDF is a C library that allows you to create PDF files from your
application or even CGI scripts. With PDF files becoming more popular
on the Internet, it is beginning to look like it may be a good idea
for more applications to be able to create and access PDF files. The
library is free if you are using it for non-profit purposes.
</p>
				</dd>
				<dt>
						<a href="http://infosun.fmi.uni-passau.de/GTL/">Graph Template Library (GTL)</a>
				</dt>
				<dd>
						<p>
This C++ graph library, based on the Standard Template Library (STL), contains classes useful
when you work with graphs, nodes, and edges, as well as basic algorithms which can be used to
build more complex graph algorithms. The library has been used on Solaris, Linux, Windows NT,
95, 98, HP-UX and FreeBSD, although it is possible that it works elsewhere as well.
</p>
				</dd>
				<dt>
						<a href="http://www.techsoftpl.com/matrix/matlite.htm">Matrix TCL Lite</a>
				</dt>
				<dd>
						<p>
Matrix TCL Lite is a C++ matrix template class that may be used for common matrix operations
like any other built-in data types. It has been tested with Borland C++ 5.0 (both 16 and 32 bit);
Borland C++ 5.5, C++ Builder version 1.0, 3.0, 4.0 and 5.0; MS Visual C++ version 4.0, 4.2, 5.0
and 6.0; SUN g++ under Sun Solaris; GNU C++ and SGI C++ version 7.2.1;
Metrowerks CodeWarrior Pro 5; and Sybase Power++ v 2.1.
</p>
				</dd>
				<dt>
						<a href="http://www.cs.cornell.edu/Info/Projects/Ensemble/index.htm">Ensemble</a>
				</dt>
				<dd>
						<p>
Ensemble is a toolkit for building reliable distributed applications. Included in this toolkit
is a library of protocols which you can use to build your distributed applications. The library
primarily uses UDP/IP sockets. You can write your applications in C, C++, Java (on Solaris and
NT), and ML. Ensemble itself is written in ML and will apparently run on any platform that
supports Objective Caml and sockets, including Windows, SunOS4, Solaris, Linux and RS6000-AIX.
You can get the binaries for SunOS, Solaris, Linux and Windows NT. Source code is also available
for download.
</p>
				</dd>
				<dt>
						<a href="http://www.linmpi.mpg.de/dislin/">Dislin</a>
				</dt>
				<dd>
						<p>
This is a plotting library for displaying data as curves, bar graphs,
pie charts, 3D-colour plots, surfaces, contours and maps. Versions
are available for C, Fortran 77 and Fortran 90 compilers on Linux,
FreeBSD, OpenVMS, MS-DOS, Windows 95/98/NT, and other flavours of Unix.
On some operating systems, Java, Perl, and Python are also supported.
(Not all versions of the library are free, though.)
</p>
				</dd>
				<dt>
						<a href="http://www.ibr.cs.tu-bs.de/projects/libsmi/">LibSMI</a>
				</dt>
				<dd>
						<p>
This C library "allows network management applications to access
SMI MIB module information through a well defined API that hides the
nasty details of locating and parsing SMIv1/v2 MIB modules."
</p>
				</dd>
				<dt>
						<a href="http://www.gnetlibrary.org/">GNET Network Library</a>
				</dt>
				<dd>
						<p>
This is a simple network library built on top of glib. It works on Linux, BSD, Mac OS X, Solaris, HP and Windows.
</p>
				</dd>
				<dt>
						<a href="ftp://ftp.hgmp.mrc.ac.uk/pub/ajb/jeeps/">LibJeeps Library</a>
				</dt>
				<dd>
						<p>
This is a "Unix-based Garmin CPS communication and analysis function library and development
system. To  quote/paraphrase from their documentation, it includes high level host communication
routines that treat waypoints, almanacs, etc as objects; datum conversions; cartographic functions;
etc. The source code is distributed under the GNU LGPL, and is written in ANSI C.
</p>
				</dd>
				<dt>
						<a href="http://sourceforge.net/projects/whisper2">Whisper C++ Application Framework</a>
				</dt>
				<dd>
						<p>
Whisper is a general purpose C++ application framework, which takes
advantage of templates, multiple inheritance, STL and exceptions.
It is portable to both Macintosh and Win32. It contains numerous debugging tools.
</p>
				</dd>
				<dt>
						<a href="http://omniorb.sourceforge.net/">OmniORB</a>
				</dt>
				<dd>
						<p>
This is a CORBA 2 ORB (with associated libraries) that was originally developed by AT&amp;T Laboratories,
Cambridge, and is certified CORBA 2.1 compliant. OmniORB is distributed under the GNU GPL and
the libraries in the package is distributed under the Library GPL. The package is designed in
such a way so that you can actually distribute your applications that use the libraries without
being forced to release your source code as well. Platforms supported include Solaris,
Windows NT, Windows 95, Linux (x86, PowerPC), Digital Unix, AIX, HPUX, Open VMS (Alpha and Vax),
NextStep, Reliant Unix, Phar Lap's Real Time ETS Kernel, SGI Irix, SCO Unixware, MacOS,
OS RTEMS, SCO OpenServer, etc. In case you are wondering what CORBA is, it basically defines
the interface and API that allows programs to communicate with each other even if they are
running on separate machines on different hardware and operating systems. If you need more
information, you can check up the
<a href="http://www.omg.org/corba/beginners.html">Object Management Group's website</a> for
their beginner's guide.
</p>
				</dd>
				<dt>
						<a href="http://www.gnu.org/directory/GNU/commoncpp.html">GNU Common C++</a>
				</dt>
				<dd>
						<p>
GNU Common C++ is a C++ framework for developing portable threaded applications. It has abstractions for
threads, sockets, XML parsing, serialization, config files, and so on, hiding the differences between platforms in its
classes so that you can write code that is (hopefully) portable. It is released under the GNU GPL license.
</p>
				</dd>
				<dt>
						<a href="http://www.cs.utexas.edu/users/emery/hoard">Hoard malloc/free Replacement</a>
				</dt>
				<dd>
						<p>
Hoard is a malloc/free replacement that is supposed to be fast,
scalable and memory efficient. It supports Linux and other Unix platforms.
</p>
				</dd>
				<dt>
						<a href="http://www.gnu.org/software/ncurses/ncurses.html">NCurses</a>
				</dt>
				<dd>
						<p>
This is a free implementation of the curses package of Unix. It has all the BSD curses
facilities plus the System V enhancements. Platforms supported include Linux and most
(if not all) Unix systems. It has been ported even to OS/2. For those not familiar with curses,
this is library that allows programs to write to the screen in a terminal-independent manner.
</p>
				</dd>
				<dt>
						<a href="http://www.odin-consulting.com/OPP/">OPP C++ Class Library</a>
				</dt>
				<dd>
						<p>
A C++ class library that has a number of features, including classes for
retrieving files via HTTP, sending and receiving email, database classes, thread support,
string class, html parser, etc. It supports Unix platforms.
</p>
				</dd>
				<dt>
						<a href="http://www.hpl.hp.com/personal/Hans_Boehm/gc/">Boehm-Demers-Weiser Garbage Collector</a>
				</dt>
				<dd>
						<p>
A garbage collector for C/C++ that can also function as a memory leak detector. You can
simply replace your calls to malloc() with GC_malloc(). Win32, Win32s, OS/2, MacOS, AmigaDOS
and Unix systems are supported.
</p>
				</dd>
		</dl>
		<h1>Related Pages</h1>
		<ul class="listoflinks">
				<li>
						<a href="http://www.thefreecountry.com/compilers/cpp.shtml" target="_top">Free C/C++ Compilers and Interpreters</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/programming/editors.shtml" target="_top">Free Programmer's Editors, IDEs, ASCII Text Editors</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/sourcecode/pascal.shtml" target="_top">Free Pascal and Delphi Libraries, Source Code and Components</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/documentation/cppbooks.shtml" target="_top">Frequently Recommended Books on C and C++</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/documentation/windowsbooks.shtml" target="_top">Frequently Recommended Books on Windows Programming</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/documentation/onlinecpp.shtml" target="_top">Free Online C/C++ Programming Tutorials and Guides</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/documentation/unixbooks.shtml" target="_top">Frequently Recommended Books on Unix Programming</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/documentation/socketsbooks.shtml" target="_top">Frequently Recommended Books on Sockets / Winsock / Internet Programming</a>
				</li>
				<li>
						<a href="http://www.thesitewizard.com/archive/webhosting.shtml" target="_top">Which Web Host Would You Recommend? (FAQ)</a>
				</li>
				<li>
						<a href="http://www.thesitewizard.com/news/nimbdaworm.shtml" target="_top">Defending Your Site / Computer From the Nimbda Worm</a>
				</li>
		</ul>
		<h1>Newest Pages on This Site</h1>
		<ul class="listoflinks">
				<li>
						<a href="http://www.thefreecountry.com/webmaster/sshandtelnet.shtml" target="_top">Free SSH (Secure Shell) and Telnet Clients</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/utilities/audioeditors.shtml" target="_top">Free Digital Audio Editors / Free Digital Sound Editing Software</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/compilers/python.shtml" target="_top">Free Python Compilers, Interpreters and Implementations</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/utilities/imagephotoediting.shtml" target="_top">Free Drawing and Painting Software, Image and Photo Editing Programs</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/programming/searchandreplace.shtml" target="_top">Free Text Search and Replace Utilities</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/compilers/perl.shtml" target="_top">Free Perl Interpreters, Ports, Compilers, Binaries, Source Code and Implementations</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/utilities/backupandimage.shtml" target="_top">Free Hard Disk Backup and Restore, Hard Disk Image and Cloning Utilities</a>
				</li>
				<li>
						<a href="http://www.thesitewizard.com/gettingstarted/nvu1.shtml" target="_top">How to Design and Publish Your Website with Nvu (free WYSIWYG web editor) (Tutorial)</a>
				</li>
				<li>
						<a href="http://www.thesitewizard.com/webdesign/usabilitysearchengine.shtml" target="_top">Appearance, Usability and Search Engine Visibility in Web Design</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/security/spywareremoval.shtml" target="_top">Free Spyware/Adware/Trojans/Keyloggers/Hijackers Removal, Detection and Prevention Tools and Sites</a>
				</li>
				<li>
						<a href="http://www.thefreecountry.com/security/antivirus.shtml" target="_top">Free Antivirus Software</a>
				</li>
		</ul>
<img src ="http://www.cppblog.com/giant35/aggbug/11017.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/giant35/" target="_blank">四海</a> 2006-08-08 20:16 <a href="http://www.cppblog.com/giant35/articles/11017.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]C++类库大全</title><link>http://www.cppblog.com/giant35/articles/11009.html</link><dc:creator>四海</dc:creator><author>四海</author><pubDate>Tue, 08 Aug 2006 10:32:00 GMT</pubDate><guid>http://www.cppblog.com/giant35/articles/11009.html</guid><wfw:comment>http://www.cppblog.com/giant35/comments/11009.html</wfw:comment><comments>http://www.cppblog.com/giant35/articles/11009.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/giant35/comments/commentRss/11009.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/giant35/services/trackbacks/11009.html</trackback:ping><description><![CDATA[原文地址：http://www.trumphurst.com/cpplibs1.html<br /><br /><a name="Introduction"></a><h1><a name="Introduction">Introduction</a></h1><a name="Contents"></a><h2><a name="Contents">Contents</a></h2><ul><li><a href="http://www.trumphurst.com/cpplibs1.html#Introduction">Introduction</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs1.html#Adding_or_amending_entries">Adding or amending entries</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs1.html#Indexes">Indexes</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs1.html#Whats_new">Whats new</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#Libraries_available_via_FTP__A_C_">Libraries available via FTP (A-C)</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#Libraries_available_via_FTP__D_L_">Libraries available via FTP (D-L)</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#Libraries_available_via_FTP__M_P_">Libraries available via FTP (M-P)</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#Libraries_available_via_FTP__Q_Z_">Libraries available via FTP (Q-Z)</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#Tools_for_C++_Programmers">Tools for C++ Programmers</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#Libraries_with_no_known_FTP_site">Libraries with no known FTP site</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#Source_code_from_books">Source code from books</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#Other_places_to_look_for_details_of_C++_libraries">Other places to look for details of C++ libraries</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#Useful_ftp_sites">Useful ftp sites</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#Commercial_libraries__A_N_">Commercial libraries (A-N)</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs8.html#Commercial_libraries__O_Z_">Commercial libraries (O-Z)</a><br /></li><li><a href="http://www.trumphurst.com/cpplibs8.html#Other_commercial_sources_of_C++_code">Other commercial sources of C++ code</a><br /></li><li><a href="http://www.trumphurst.com/cpplibsx.html#Index_by_section_title">Index by section/title</a><br /></li></ul><p></p><hr /><a name="Introduction"></a><h2><a name="Introduction">Introduction</a></h2><a name="231"></a><h3><a name="231">Dos and don'ts - (Mostly don'ts)</a></h3><ul><li><a name="231"><b>Do not</b> reply to the posting of this list in
the newsgroup, quoting the entire text. I get an average of one mail
like this per month, which I have to <u>pay</u> to download.
</a></li><li><a name="231"><b>Do not</b> send me mail asking for help
with your programming - unless you are willing to pay my normal daily
rate for consultancy. Free advice is available from Usenet newsgroups
like comp.lang.c++.
</a></li><li><a name="231"><b>Do not</b> send me mail asking if there is a library to do a particular task. All the libraries I know about are in this list.
</a></li><li><a name="231">I do not actually have copies of the
libraries in the list. I do not evaluate the libraries in the list, I
just collect together information sent in by the authors or others. So
it's no use asking me how good a particular library is, or, indeed,
anything about them that isn't already in the list.
</a></li><li><a name="231">If you want me to include your library in the list, send in a submission. <b>Do not</b> just send in a URL, and expect me to pay to connect to the Internet, download your Web page(s) and summarise them. That's <u>your</u> job.
</a></li></ul><p><a name="231">Added : 04/12/1997   Amended : 04/12/1997 
Licensing : N/A
</a></p><ul><li><a href="news:comp.lang.c++">Newsgroup:comp.lang.c++</a></li></ul><hr /><a name="9"></a><h3><a name="9">About the list</a></h3><a name="9">Here is the latest draft of the "Available C++ libraries FAQ". 
</a><p><a name="9"><b>This list is not exhaustive.</b> If you are looking for a particular library, and you don't find it here, try an ordinary Web search engine (e.g. </a><a href="http://www.google.com/">Google</a>). If you do find a suitable library, why not use the submission form to add it to this list for the next person?
</p><p>Due to the increasing size of this list, and problems with
updating the automatic poster at rtfm.mit.edu, the full list is now
only available on the Web (at "http://www.trumphurst.com/cpplibs/" and
"http://purl.oclc.org/NET/C++Libraries").
</p><p>
Marshall Cline's C++ FAQ is available on his <a href="http://www.parashift.com/c++-faq-lite/">Web page</a>.
</p><p>I have not included a credits list, because it would be nearly
as large as the rest of the file! Many thanks to all those who
contributed, and I hope you won't be offended that I haven't mentioned
you.
</p><p>Please mail comments, criticisms, additions and amendments to
me at cpplibs@trumphurst.com. However, please DO NOT mail me with
requests for assistance in finding files mentioned in the list. I am
unable to provide such a service. Definite information such as "file
xyz is no longer at site xxx" IS welcome - even better if you can tell
me an alternative site where it can be found. If you are new to the
Internet, try to find out about tools such as archie, whois, www,
gopher etc. I recommend the newsgroups "news.announce.newusers" and
"news.answers" for starters. See also the Web "roadmap" to such
services listed below.
</p><p>
Added : 01/01/1995   Amended : 16/05/2006 
Licensing : N/A
</p><ul><li><a href="news:comp.lang.c++">Newsgroup:comp.lang.c++</a></li><li><a href="news:news.answers">Newsgroup:news.answers</a></li><li><a href="ftp://rtfm.mit.edu/pub/usenet-by-group/comp.lang.c++/">C++ directory at rtfm</a></li><li><a href="mailto:mail-server@rtfm.mit.edu">RTFM mail server</a></li><li><a href="mailto:cpplibs@trumphurst.com">Mail a submission to the list</a></li><li><a href="http://www.trumphurst.com/cpplibs/">Web version of the list</a></li><li><a href="http://www.trumphurst.com/cppsub.html">A Web form to add your submission to the list</a></li><li><a href="http://purl.oclc.org/NET/C++Libraries">PURL for the Web version</a></li><li><a href="http://ua1vm.ua.edu/%7Ecrispen/roadmap.html">Web roadmap - how to use Archie etc.</a></li><li><a href="http://www.trumphurst.com/www.parashift.com/c++-faq-lite/">Marshall Cline's C++ FAQ</a></li><li><a href="news:alt.comp.lang.learn.c-c++">Newsgroup for C++ learners</a></li></ul><hr /><hr /><a name="Adding_or_amending_entries"></a><h2><a name="Adding_or_amending_entries">Adding or amending entries</a></h2><a name="171"></a><h3><a name="171">Sending in a new entry</a></h3><a name="171">If your library isn't mentioned, or you wish to update
your entry in this list, feel free to mail me the new entry, or submit
it via the Web form. Please note that entries will be restricted to a
couple of paragraphs - if you send me a 100k text file giving minute
details, I will have to summarise it. Or I might just ignore it, if I'm
busy. It is much easier for me if you just send me an entry which is
the right size to start with.
</a><p><a name="171">Please try to format your entry in the same way as the
entries already in this list. Suggested points to include in your entry
are ...</a></p><ul><li><a name="171">Name of package
</a></li><li><a name="171">1-line summary of purpose
</a></li><li><a name="171">Short list of features
</a></li><li><a name="171">Supported compilers
</a></li><li><a name="171">Supported operating systems
</a></li><li><a name="171">Licence restrictions
</a></li><li><a name="171">Vendors may care to give an idea of prices
</a></li><li><a name="171">E-mail addresses for more details
</a></li><li><a name="171">Ftp site(s)
</a></li><li><a name="171">WWW URL
</a></li><li><a name="171">Postal address/telephone/FAX numbers.
</a></li></ul><a name="171">If you wish, you may include HTML tags in your text,
which will make it through to the WWW version of this document. Please
do not use heading levels 1-3, and please do not include any hot links
in the body of the text - all links should occur at the end of the
text.
</a><p><a name="171">Please add references <b>at the end of your text</b> in the form &lt;tag&gt;:&lt;item&gt; [;&lt;link text&gt;] <br />
Where</a></p><ul><li><a name="171">&lt;tag&gt; is one of http, ftp, mailto, news, author, postal, tel, fax or bbs
</a></li><li><a name="171">&lt;item&gt; is a single line of text. Separate parts of a postal address with commas.
</a></li><li><a name="171">&lt;link text&gt; is optional text describing the reference
</a></li></ul><a name="171">Examples:</a><ul><li><a name="171">http://www.ashmount.com/trumphurst/cpplibs1;Available C++ Libraries
</a></li><li><a name="171">ftp://ftp.ashmount.com/trumphurst/docclass/docclass.zip;DocClass utility
</a></li><li><a name="171">mailto:cpplibs@trumphurst.com;Mail a submission to the FAQ
</a></li><li><a name="171">news:comp.lang.c++
</a></li><li><a name="171">author:Nikki Locke
</a></li><li><a name="171">fax:1-800-456-789;Toll-free enquiries
</a></li></ul><a name="171">Please mail comments, criticisms, additions and amendments to me at cpplibs@trumphurst.com.
</a><p></p><h4><a name="171">NOTE TO VENDORS</a></h4><a name="171">This FAQ contains details of both free and commercial
libraries. Vendors who have sent me details of their libraries for
inclusion in the FAQ have been pleasantly surprised by the level of
interest generated. Please remember, I only allow 2 or 3 paragraphs
describing the product, and no advertising hype !
</a><p><a name="171">Added : 01/01/1995   Amended : 09/04/2001 
Licensing : N/A
</a></p><ul><li><a href="mailto:cpplibs@trumphurst.com">Mail a submission to the list</a></li><li><a href="http://www.trumphurst.com/cppsub.html">A Web form to add your submission to the list</a></li></ul><hr /><hr /><a name="Indexes"></a><h2><a name="Indexes">Indexes</a></h2><a name="172"></a><h3><a name="172">How to find libraries in the FAQ</a></h3><a name="172">The database software automatically creates an index of items by name and category which is accessible from the WWW.
</a><p><a name="172">However, the recommended way to search the database is via the frame page, which accesses the database directly.
</a></p><p><a name="172">Added : 01/01/1995   Amended : 26/04/2000 
Licensing : N/A
</a></p><ul><li><a href="http://www.trumphurst.com/cpplibsx.html">Web index</a></li><li><a href="http://www.trumphurst.com/cpplibs/">Frame page to access the database directly</a></li></ul><hr /><hr /><a name="Whats_new"></a><h2><a name="Whats_new">Whats new</a></h2><ul><a name="Whats_new">Last update was on Nov 1 1999<br /></a><li><a href="http://www.trumphurst.com/cpplibs1.html#9">About the list</a>  updated on May 16 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs1.html#171">Sending in a new entry</a>  updated on Apr 9 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs1.html#172">How to find libraries in the FAQ</a>  updated on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#226">CIDLib</a>  updated on Dec 22 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#350">CLN</a>  added on Jan 31 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#347">ColDet</a>  added on Jan 10 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#345">ACDK</a>  added on Dec 22 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#315">APE</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#400">C++/Tk</a>  added on Nov 8 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#388">Common C++</a>  added on Dec 15 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#346">Architector</a>  added on Dec 29 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#223">Cgipp</a>  updated on Sep 10 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#195">Conical</a>  updated on Apr 2 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#190">C++Advio</a>  updated on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#17">Aisearch</a>  updated on May 3 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#270">CGAL</a>  updated on Oct 25 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#403">C++ Sockets Library</a>  added on Jan 31 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#413">b64</a>  added on Apr 29 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#401">C++/Tcl</a>  added on Nov 24 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs2.html#406">C++ Portable Components</a>  added on Feb 28 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#410">Developer</a>  added on Mar 14 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#409">Developer</a>  added on Mar 14 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#362">ICU</a>  added on Mar 8 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#256">GzipFile</a>  updated on Jul 29 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#320">Lodestar Database - Client/Server</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#258">ImageLib</a>  updated on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#355">FEMTown</a>  added on Sep 28 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#274">Image Magick</a>  updated on Mar 13 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#275">Elemental</a>  updated on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#368">GRETA Regular Expression Template Archive</a>  added on Jun 21 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#348">ixlib</a>  added on Jan 22 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#241">JPTUI</a>  updated on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#304">libCON</a>  updated on Aug 9 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#312">GraphLib</a>  added on Nov 8 1999<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#333">iMatrix</a>  added on May 25 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#314">kplib</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#327">Ivf++</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#325">Fast Light Toolkit</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#319">BCGControlBar</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#323">GTL</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#349">GiNaC</a>  added on Jan 31 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#63">Kalman</a>  updated on Oct 20 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#416">Dinkum Compleat Library</a>  added on Jul 3 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#397">jjLibrary</a>  added on Sep 6 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#396">libpropc++</a>  added on Aug 31 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs3.html#379">Depression Glass Debug Library</a>  added on Apr 9 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#331">MixGCI</a>  added on May 12 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#55">Newmat</a>  updated on Sep 27 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#64">Matrix</a>  updated on Mar 8 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#334">mpatrol</a>  added on Jul 28 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#70">PARODY</a>  updated on Jan 6 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#266">OptiVec</a>  updated on Dec 8 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#383">macstl</a>  added on Jul 23 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#261">MetaKit</a>  updated on Jul 28 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#366">Ptypes</a>  added on Jun 18 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs4.html#375">PNGwriter</a>  added on Jan 8 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#286">WinZilla</a>  updated on Aug 19 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#341">Quercus Robusta</a>  added on Sep 22 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#330">VXCL</a>  added on May 3 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#329">VTL - Views Template Library</a>  added on May 3 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#48">SOCKET++</a>  updated on May 14 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#328">SXP</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#407">YARD (Yet Another Recursive Descent) Parser</a>  added on Mar 30 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#344">VTK</a>  added on Nov 6 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#392">SDL</a>  added on Jun 22 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#339">Zipios++</a>  added on Aug 9 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#402">xpressive</a>  added on Jan 24 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#23">wxWindows</a>  updated on Aug 19 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#415">shwild</a>  added on May 15 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#369">XD++</a>  added on Jun 30 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#412">Dr.</a>  added on Apr 20 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#377">YAMI</a>  added on Mar 7 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#398">SOCI</a>  added on Sep 29 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#363">VXL</a>  added on Apr 16 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#378">UVS</a>  added on Mar 7 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#287">SMTP/POP3</a>  updated on Mar 8 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#414">Ultimate++</a>  added on May 8 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#289">SV_Lib</a>  updated on Jul 7 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#384">STLSoft</a>  added on Aug 8 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#386">tvmet</a>  added on Nov 4 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#387">recls</a>  added on Nov 6 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#417">Wykobi C++ Computational Geometry Library</a>  added on Aug 2 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#360">Shift-Right Open Repository</a>  added on Mar 8 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs5.html#390">Rhapsodia.Scheduler</a>  added on Jan 16 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#313">cxx2html</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#196">MkHelp</a>  updated on Aug 18 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#411">XSD</a>  added on Mar 14 2006<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#337">Understand for C++</a>  added on Jul 28 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#364">Weblet Application Server</a>  added on May 23 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#399">LaKe</a>  added on Oct 19 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#395">Ch C/C++ interpreter</a>  added on Jul 19 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#391">The KDevelop-Project was raised in 1998 to build u</a>  added on Feb 17 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#385">President</a>  added on Oct 17 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#371">VCF</a>  added on Jul 24 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#370">Imagix 4D</a>  added on Jul 19 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#367">5Loaves</a>  added on Jun 19 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#361">QScimpl</a>  added on Mar 8 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#359">OOFILE</a>  added on Mar 8 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#358">SourceStyler C++</a>  added on Nov 1 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#343">CoreLinux++</a>  added on Nov 2 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#335">LEADTOOLS</a>  added on Jul 28 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#338">SourcePublisher C++</a>  added on Jul 28 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#324">CGI.h C++ include file</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#404">Rich Booleans</a>  added on Feb 11 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#405">ModAssert</a>  added on Feb 11 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#351">IPL98</a>  added on May 25 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#321">OptSolve++</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#408">Dr.</a>  added on Sep 16 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#352">General complex C++ matrix library</a>  added on Jun 13 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#84">Hansen</a>  updated on Sep 18 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#85">Coplien</a>  updated on Sep 18 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs6.html#322">Moderator</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#376">Dalc++</a>  added on Jan 8 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#394">SoftIntegration Graphical Library (SIGL)</a>  added on Jul 19 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#121">MacApp</a>  updated on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#326">EasyTrans</a>  added on Apr 26 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#393">Embedded Software Framework</a>  added on Jul 7 2004<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#382">BitLevelTrace - Protocol Decoding C Library</a>  added on May 13 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#365">Developer</a>  added on Jun 11 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#380">BitLevelSMS - Short Message Serives (SMS) Library</a>  added on May 13 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#336">jfront rawjava</a>  added on Jul 28 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#340">MtxVec</a>  added on Aug 15 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#260">MIME++</a>  updated on Jul 1 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#354">CodeBase Database Engine for C/C++ Developers</a>  added on Sep 23 2001<br /></li><li><a href="http://www.trumphurst.com/cpplibs7.html#381">BitLevelGPS - Global Positioning System Library</a>  added on May 13 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs8.html#131">WNDX</a>  updated on Oct 31 2005<br /></li><li><a href="http://www.trumphurst.com/cpplibs8.html#373">Visibility for C++</a>  added on Sep 20 2002<br /></li><li><a href="http://www.trumphurst.com/cpplibs8.html#332">SCSI++ Class Library</a>  added on May 18 2000<br /></li><li><a href="http://www.trumphurst.com/cpplibs8.html#389">Valentina</a>  added on Dec 29 2003<br /></li><li><a href="http://www.trumphurst.com/cpplibs8.html#356">rxstring</a>  added on Oct 18 2001<br /></li></ul><hr /><a href="http://www.trumphurst.com/">Trumphurst Home Page</a><br /><a href="news:comp.lang.c++">C++ Usenet Newsgroup</a><p><a href="mailto:cpplibs@trumphurst.com">Mail amendments or additions to this list</a><br /><a href="http://www.trumphurst.com/cppsub.html">A Web form for submissions to this list</a><br /><a href="mailto:cpplibs@trumphurst.com">Mail the author for permission to distribute</a></p><p><i>Copyright (c)  2006  Nikki Locke, Trumphurst Ltd.</i><br />
Permission is granted to distribute over the Internet without charge.
The author's permission is <b>required</b> (and usually given) to distribute
in any other way, including on CD.
</p><img src ="http://www.cppblog.com/giant35/aggbug/11009.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/giant35/" target="_blank">四海</a> 2006-08-08 18:32 <a href="http://www.cppblog.com/giant35/articles/11009.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]C++ 扩展和嵌入 Python</title><link>http://www.cppblog.com/giant35/articles/10526.html</link><dc:creator>四海</dc:creator><author>四海</author><pubDate>Wed, 26 Jul 2006 06:31:00 GMT</pubDate><guid>http://www.cppblog.com/giant35/articles/10526.html</guid><wfw:comment>http://www.cppblog.com/giant35/comments/10526.html</wfw:comment><comments>http://www.cppblog.com/giant35/articles/10526.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/giant35/comments/commentRss/10526.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/giant35/services/trackbacks/10526.html</trackback:ping><description><![CDATA[
		<form name="form2" method="post" action="/SYS/script/find.asp">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tbody>
								<tr>
										<td>
												<span id="docinfo">
												</span>原文：http://www.vckbase.com/document/viewdoc/?id=1540<br /></td>
										<td align="right">
												<br />
										</td>
								</tr>
						</tbody>
				</table>
		</form>
		<p align="center">
				<b>
						<br />
				</b>
		</p>
		<p align="center">
				<b>C++ 扩展和嵌入 Python</b>
				<br />
				<br />
      作者：<a href="mailto:tohjs#163.com">胡金山</a></p>
		<p>
				<a href="http://www.vckbase.com/code/downcode.asp?id=2777">下载源代码</a>
				<br />
				<br />
				<b>Python简介</b>
				<br />
				<br />
		　　Python是一种简单易学，功能强大的解释型编程语言，它有简洁明了的语法，高效率的高层数据结构，能够简单而有效地实现面向对象编程，特别适用于快速应用程序开发，也可以用来开发大规模的重要的商业应用。Python是一个理想的脚本语言。<br />
		　　Python免费开源，可移植到多种操作系统，只要避免使用依赖于特定操作系统的特性，Python程序无需修改就可以在各种平台上面运行。<br />
　　Python拥有现代编程语言所具有的一切强大功能，Python标准库十分庞大，可以帮助开发者处理各种工作，如：图形用户界面、文件处理、多媒
体、正则表达式、文档生成、单元测试、线程、数据库、网络通讯、网页浏览器、CGI、FTP、电子邮件、XML、HTML、WAV文件、密码系统、Tk和
其他与系统有关的操作。只要安装了Python，这些功能都是可用的除了标准库以外，还有许多其他高质量的库，如wxPython、Twisted和
Python图形库等等数不胜数。<br />
　　Python容易扩展和嵌入。Python提供的许多标准模块支持C或者C++接口。Python和C可以一起工作，它可以嵌入到C或者C++的应用
程序当中，因此可用Python语言为应用程序提供脚本接口，由于支持跨语言开发，可用Python设计概念化应用程序，并逐步移植到C，使用前不必用C
重写应用程序。(Jython使Python可以和Java一起工作，使开发者可以在Python里面调Java的包，也可以在Java里面使用
Python的对象。还有更妙的,由于Jython的解释器完全用Java编写，因此可以在支持Java的任何平台上部署Python程序，甚至WEB浏
览器也可以直接运行Python脚本。)<br /><br /><b>提出问题</b><br /><br />
　　在某个C++应用程序中，我们用一组插件来实现一些具有统一接口的功能，我们使用Python来代替动态链接库形式的插件，这样可以方便地根据需求的
变化改写脚本代码，而不是必须重新编译链接二进制的动态链接库。Python强大的功能足以胜任，但是有一些操作系统特定的功能需要用C++来实现，再由
Python调用。所以，最基础地，我们需要做到：</p>
		<ul>
				<li>1. 把Python嵌入到C++应用程序中，在C++程序中调用Python函数和获得变量的值；</li>
				<li>2. 用C++为Python编写扩展模块(动态链接库)，在Python程序中调用C++开发的扩展功能函数。</li>
		</ul>
		<p>
				<b>常用的Python/C API介绍</b>
				<br />
				<br />
		　　下面是例子中用到的几个Python/C 
		API的简要介绍及示例代码。注意，这并不是这些函数的详细介绍，而仅仅是我们所用到的功能简介，更详细内容请参考文档[1]、[2]、[3]、[4]。<br />
		打开Microsoft Visual Studio .NET 2003，新建一个控制台程序，#include &lt;Python.h&gt;，并在main函数里加入示例代码。<br />
		//先定义一些变量
		</p>
		<pre>char *cstr;<br />PyObject *pstr, *pmod, *pdict;<br />PyObject *pfunc, *pargs;<br /></pre>
1.         void Py_Initialize( )      	<br />
		　　初始化Python解释器，在C++程序中使用其它Python/C API之前，必须调用此函数，如果调用失败，将产生一个致命的错误。例：<pre>Py_Initialize();<br /></pre>
2. int PyRun_SimpleString( const char *command)<br /><p>执行一段Python代码，就好象是在__main__ 函数里面执行一样。例：</p><pre>PyRun_SimpleString("from time import time,ctime\n"<br />"print ''Today is'',ctime(time())\n");<br /></pre>
3. PyObject* PyImport_ImportModule( char *name)<br /><p>导入一个Python模块，参数name可以是*.py文件的文件名。相当于Python内建函数__import__()。例：</p><pre>pmod = PyImport_ImportModule("mymod"); //mymod.py<br /></pre>
4. PyObject* PyModule_GetDict( PyObject *module) <br /><p>相当于Python模块对象的__dict__ 属性，得到模块名称空间下的字典对象。例：</p><pre>pdict = PyModule_GetDict(pmod);<br /></pre>
5. PyObject* PyRun_String( const char *str, int start, PyObject *globals, PyObject *locals)<br /><p>执行一段Python代码。</p><pre>pstr = PyRun_String("message", Py_eval_input, pdict, pdict);<br /></pre>
6. int PyArg_Parse( PyObject *args, char *format, ...)<br /><p>解构Python数据为C的类型，这样C程序中才可以使用Python里的数据。例：</p><pre>/* convert to C and print it*/<br />PyArg_Parse(pstr, "s", &amp;cstr);<br />printf("%s\n", cstr);<br /></pre>
7. PyObject* PyObject_GetAttrString( PyObject *o, char *attr_name)<br /><p>返回模块对象o中的attr_name 属性或函数，相当于Python中表达式语句：o.attr_name。例：</p><pre>/* to call mymod.transform(mymod.message) */<br />pfunc = PyObject_GetAttrString(pmod, "transform");<br /></pre>
8. PyObject* Py_BuildValue( char *format, ...)<br /><p>构建一个参数列表，把C类型转换为Python对象，使Python可以使用C类型数据，例：</p><pre>cstr="this is hjs''s test, to uppercase";<br />pargs = Py_BuildValue("(s)", cstr);<br /></pre>
9. PyEval_CallObject(PyObject* pfunc, PyObject* pargs)<br /><p>　　此函数有两个参数，都指向Python对象指针，pfunc是要调用的Python 函数，通常可用PyObject_GetAttrString()获得；pargs是函数的参数列表，通常可用Py_BuildValue()构建。例：</p><pre>pstr = PyEval_CallObject(pfunc, pargs);<br />PyArg_Parse(pstr, "s", &amp;cstr);<br />printf("%s\n", cstr);<br /></pre>
10. void Py_Finalize( ) <br /><p>关闭Python解释器，释放解释器所占用的资源。例：</p><pre>Py_Finalize();</pre><p>
		　　Python2.4环境没有提供调试版本的Python24d.lib，所以上述示例在release模式下编译。编译完成后，把可行文件和附2给出的mymod.py文件放在一起，再点击即可运行。为了简化编程，附3 
		给出了simplepy.h。这样，调用mymod.transform变成如下形式：</p><pre>//#include”simplepy.h”<br />CSimplepy py;<br />py.ImportModule("mymod");<br />std::string str=py.CallObject("transform", <br />"this is hjs''s test, to uppercase");<br />printf("%s\n", str.c_str());</pre><p>　　接下来，我们来用C++为Python编写扩展模块(动态链接库)，并在Python程序中调用C++开发的扩展功能函数。生成一个取名为pyUtil的Win32 
		DLL工程，除了pyUtil.cpp文件以外，从工程中移除所有其它文件，并填入如下的代码：
		</p><pre>// pyUtil.cpp<br />#ifdef PYUTIL_EXPORTS<br />#define PYUTIL_API __declspec(dllexport)<br />#else<br />#define PYUTIL_API __declspec(dllimport)<br />#endif<br /><br />#include&lt;windows.h&gt;<br />#include&lt;string&gt;<br />#include&lt;Python.h&gt;<br />BOOL APIENTRY DllMain( HANDLE hModule, <br />                       DWORD  ul_reason_for_call, <br />                       LPVOID lpReserved<br />                    ?)<br />{<br />    switch (ul_reason_for_call)<br />    {<br />    case DLL_PROCESS_ATTACH:<br />    case DLL_THREAD_ATTACH:<br />    case DLL_THREAD_DETACH:<br />    case DLL_PROCESS_DETACH:<br />        break;<br />    }<br />    return TRUE;<br />}<br />std::string Recognise_Img(const std::string url)<br />{<br />    //返回结果<br />    return "从dll中返回的数据... : " +url;<br />}<br />static PyObject* Recognise(PyObject *self, PyObject *args)<br />{<br />    const char *url;<br />    std::string sts;<br />    if (!PyArg_ParseTuple(args, "s", &amp;url))<br />        return NULL;<br />    sts = Recognise_Img(url);<br />    return Py_BuildValue("s", sts.c_str() );<br />}<br />static PyMethodDef AllMyMethods[] = {<br />    {"Recognise",  Recognise, METH_VARARGS},//暴露给Python的函数<br />    {NULL,      NULL}        /* Sentinel */<br />};<br />extern "C" PYUTIL_API void initpyUtil()<br />{<br />    PyObject *m, *d;<br />    m = Py_InitModule("pyUtil", AllMyMethods); //初始化本模块，并暴露函数<br />    d = PyModule_GetDict(m);<br />}<br /></pre>
在Python代码中调用这个动态链接库：
<pre>import pyUtil<br />result = pyUtil.Recognise("input url of specific data")<br />print "the result is: "+ result		</pre>
　　
用C++为Python写扩展时，如果您愿意使用Boost.Python库的话，开发过程会变得更开心J，要编写一个与上述pyUtil同样功能的动态
链接库，只需把文件内容替换为下面的代码。当然，编译需要boost_python.lib支持，运行需要boost_python.dll支持。 <pre>#include&lt;string&gt;<br />#include &lt;boost/python.hpp&gt;<br />using namespace boost::python;<br />#pragma comment(lib, "boost_python.lib")<br />std::string strtmp;<br />char const* Recognise(const char* url)<br />{<br />    strtmp ="从dll中返回的数据... : ";<br />    strtmp+=url;<br />    return strtmp.c_str();<br />}<br />BOOST_PYTHON_MODULE(pyUtil)<br />{<br />    def("Recognise", Recognise);<br />}<br /></pre>

所有示例都在Microsoft Windows XP Professional + Microsoft Visual Studio .NET 2003 + Python2.4环境下测试通过，本文所用的Boost库为1.33版本。
<br /><br /><b>参考资料</b><ul><li>[1] Python Documentation Release 2.4.1. 2005.3.30，如果您以默认方式安装了Python2.4，那么该文档的位置在C:\Program Files\Python24\Doc\Python24.chm；</li><li>[2] Michael Dawson. Python Programming for the Absolute Beginner. Premier Press. 2003；</li><li>[3] Mark Lutz. Programming Python, 2nd Edition. O''Reilly. 2001.3
			；</li><li>[4] Mark Hammond, Andy Robinson. Python Programming on Win32. O''Reilly. 2000.1
			；</li><li>Python主页：<a href="http://www.python.org/">http://www.python.org</a>；</li><li>Boost库主面：www.boost.org；</li></ul><pre>附1 text.txt<br />this is test text in text.txt.<br />附2 mymod.py<br />import string<br />message = ''original string''<br />message =message+message<br />msg_error=""<br />try:<br />       text_file = open("text.txt", "r")<br />       whole_thing = text_file.read()<br />       print whole_thing<br />       text_file.close()<br />except IOError, (errno, strerror):<br />       print "I/O error(%s): %s" % (errno, strerror)<br />def transform(input):<br />    #input = string.replace(input, ''life'', ''Python'')<br />    return string.upper(input) <br />def change_msg(nul):   <br />    global message #如果没有此行，message是函数里头的局部变量<br />    message=''string changed''<br />    return message<br />def r_file(nul):<br />    return whole_thing<br />def get_msg(nul):<br />return message<br /><br />附3 simplepy.h<br />#ifndef _SIMPLEPY_H_<br />#define _SIMPLEPY_H_<br />// simplepy.h v1.0<br />// Purpose: facilities for Embedded Python.<br />// by hujinshan @2005年9月2日9:13:02<br />#include <string><br />using std::string;<br />#include <python.h><br />//--------------------------------------------------------------------<br />// Purpose: ease the job to embed Python into C++ applications<br />// by hujinshan @2005年9月2日9:13:18<br />//--------------------------------------------------------------------<br />class CSimplepy // : private noncopyable<br />{<br />public:<br />    ///constructor<br />    CSimplepy()<br />    {<br />        Py_Initialize();<br />        pstr=NULL, pmod=NULL, pdict=NULL;<br />        pfunc=NULL, pargs=NULL;<br />    }<br />    ///destructor<br />    virtual ~CSimplepy()    <br />    {   <br />        Py_Finalize();<br />    }<br />    ///import the user module<br />    bool ImportModule(const char* mod_name)<br />    {<br />        try{<br />            pmod  = PyImport_ImportModule(const_cast<char*>(mod_name));<br />            if(pmod==NULL)<br />                return false;<br />            pdict = PyModule_GetDict(pmod);<br />        }<br />        catch(...)<br />        {<br />            return false;<br />        }<br />        if(pmod!=NULL &amp;&amp; pdict!=NULL)<br />            return true;<br />        else<br />            return false;<br />    }<br />    ///Executes the Python source code from command in the __main__ module. <br />    ///If __main__ does not already exist, it is created. <br />    ///Returns 0 on success or -1 if an exception was raised. <br />    ///If there was an error, there is no way to get the exception information.<br />    int Run_SimpleString(const char* str)<br />    {<br />        return PyRun_SimpleString(const_cast<char*>(str) );<br />    }<br />    ///PyRun_String("message", Py_eval_input, pdict, pdict);<br />    ///Execute Python source code from str in the context specified by the dictionaries globals.<br />    ///The parameter start specifies the start token that should be used to parse the source code. <br />    ///Returns the result of executing the code as a Python object, or NULL if an exception was raised.<br />    string Run_String(const char* str)<br />    {<br />        char *cstr;<br />        pstr  = PyRun_String(str, Py_eval_input, pdict, pdict);<br />        if(pstr==NULL)<br />            throw ("when Run_String, there is an exception was raised by Python environment.");<br />        PyArg_Parse(pstr, "s", &amp;cstr);<br />        return string(cstr);<br />    }<br />    ///support olny one parameter for python function, I think it''s just enough.<br />    string CallObject(const char* func_name, const char* parameter)<br />    {<br />        pfunc=NULL;<br />        pfunc = PyObject_GetAttrString(pmod, const_cast<char*>(func_name));<br />        if(pfunc==NULL)<br />            throw (string("do not found in Python module for: ")<br />+func_name).c_str();<br />        char* cstr;<br />        pargs = Py_BuildValue("(s)", const_cast<char*>(parameter));<br />        pstr  = PyEval_CallObject(pfunc, pargs);<br />        if(pstr==NULL)<br />            throw ("when PyEval_CallObject, there is an exception was raised by Python environment");<br />        PyArg_Parse(pstr, "s", &amp;cstr);      <br />        return string(cstr);<br />    }<br />    //PyObject *args;<br />    //args = Py_BuildValue("(si)", label, count);   /* make arg-list */<br />    //pres = PyEval_CallObject(Handler, args);      <br />protected:<br />    PyObject *pstr, *pmod, *pdict;<br />    PyObject *pfunc, *pargs;<br />};<br />#endif // _SIMPLEPY_H_<br />// end of file </char*></char*></char*></char*></python.h></string></pre><img src ="http://www.cppblog.com/giant35/aggbug/10526.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/giant35/" target="_blank">四海</a> 2006-07-26 14:31 <a href="http://www.cppblog.com/giant35/articles/10526.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>.Net AOP Frameworks Research Report v1.1</title><link>http://www.cppblog.com/giant35/articles/10525.html</link><dc:creator>四海</dc:creator><author>四海</author><pubDate>Wed, 26 Jul 2006 06:26:00 GMT</pubDate><guid>http://www.cppblog.com/giant35/articles/10525.html</guid><wfw:comment>http://www.cppblog.com/giant35/comments/10525.html</wfw:comment><comments>http://www.cppblog.com/giant35/articles/10525.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/giant35/comments/commentRss/10525.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/giant35/services/trackbacks/10525.html</trackback:ping><description><![CDATA[
		<h2>
				<a id="viewpost1_TitleUrl" href="http://chegan.cnblogs.com/archive/2005/08/31/226825.html">.Net AOP Frameworks Research Report v1.1 </a>
		</h2>
		<p>原文地址：<a href="http://teddyma.cnblogs.com/archive/2005/08/31/226688.html">http://teddyma.cnblogs.com/archive/2005/08/31/226688.html</a></p>
		<div class="postTitle">
				<a id="viewpost1_TitleUrl" href="http://teddyma.cnblogs.com/archive/2005/08/31/226688.html">.Net AOP Frameworks Research Report v1.1</a>
		</div>
		<h2>
				<span style="font-size: 12pt;" lang="EN-US">
						<span>
								<span style="font-size: 18pt;">
										<a name="_Toc113018380">
												<span style="font-size: 14pt; font-family: Times New Roman;" lang="EN-US">
														<span>1.<span> </span></span>
														<span lang="EN-US">Aspect#</span>
												</span>
										</a>
										<a name="_Toc113018380">
										</a>
								</span>
						</span>
				</span>
		</h2>
		<p>
				<span lang="EN-US">Version: <st1:chsdate isrocdate="False" islunardate="False" day="30" month="12" year="1899" w:st="on">2.1.1</st1:chsdate>.0</span>
		</p>
		<p>
				<span lang="EN-US">Link: </span>
				<span lang="EN-US">
						<a href="http://aspectsharp.sourceforge.net/" target="_blank">http://aspectsharp.sourceforge.net/</a>
				</span>
		</p>
		<p>
				<span lang="EN-US">Status: beta</span>
		</p>
		<p>
				<span lang="EN-US">Dependency: antlr, Castle.DynamicProxy</span>
		</p>
		<p>
				<span lang="EN-US">Description:</span>
		</p>
		<p>
				<span lang="EN">Aspect# is an AOP (Aspect Oriented Programming)
framework for the CLI (.Net and Mono). It relies on DynamicProxy and
offers a built-in language to declare and configure aspects, and is
compliant to AopAlliance. It became part of the Castle Project in June
2005.</span>
		</p>
		<p>
				<st1:place w:st="on">
						<span lang="EN-US">Main</span>
				</st1:place>
				<span lang="EN-US"> Features:</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Custom mini configuration language, not xml.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Mix/Intercept classes and methods through dicnamic proxy approach.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">Restrictions:</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span></span></span>
						<span lang="EN-US">Classes to be created dynamic proxy for shouldn’t be sealed and only virtual methods can be intercepted.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Using
intercepted classes is not completely transaparent to users that users
should explicit create the dynamically proxied class through the
AspectEngine.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">No static weaving support.</span>
				</span>
		</p>
		<h2>
				<span lang="EN-US">
						<span>
								<span style="font-family: Times New Roman;">
										<a name="_Toc113018381">
												<span style="font-size: 14pt;" lang="EN-US">
														<span>2. </span>
														<span lang="EN-US">AspectDNG</span>
												</span>
										</a>
										<a name="_Toc113018381">
										</a>
								</span>
						</span>
				</span>
		</h2>
		<p>
				<span lang="EN-US">Version: 0.7</span>
		</p>
		<p>
				<span lang="EN-US">Status: beta</span>
		</p>
		<p>
				<span lang="EN-US">Link: </span>
				<span lang="EN-US">
						<a href="http://www.dotnetguru.org/downloads/AspectDNG/???">http://sourceforge.net/projects/aspectdng</a>
				</span>
		</p>
		<p>
				<span lang="EN-US">Dependency: mono.petoolkit, rail</span>
		</p>
		<p>
				<span lang="EN-US">Description:</span>
		</p>
		<p>
				<span lang="EN-US">AspectDNG is a .NET aspect weaver, that's to say
a tool that can "transplant" code into an existing assembly. This
transplant is made after the standard .NET compilation, which means
that both aspect and the so called "base" code (the one the transplant
will be operated on) can be developped in any programming language that
is compatible with .NET CLS. Another way to say that: AspectDNG works
on assemblies (EXE or DLL) that may have been created out of C#,
VB.NET, Eiffel.NET, Mananged C++... </span>
		</p>
		<p>
				<st1:place w:st="on">
						<span lang="EN-US">Main</span>
				</st1:place>
				<span lang="EN-US"> Features:</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Xml, Xpath based configuration file format.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">IL level static Weaving.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Custom xml based </span>
						<span lang="EN-US">disassembled </span>
						<span lang="EN-US">language </span>
						<span lang="EN-US">ILML which can be used to convert assemblies to and be modified/combined and then converted to assemblies.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">Restrictions:</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Static weaving only.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Not very stable.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>
								<span style="font-family: Times New Roman;">
										<a name="_Toc113018382">
												<span style="font-size: 14pt;" lang="EN-US">
														<strong>
																<span>3.<span> </span></span>
																<span lang="EN-US">Eos</span>
														</strong>
												</span>
										</a>
										<a name="_Toc113018382">
										</a>
								</span>
						</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">Version: <st1:chsdate isrocdate="False" islunardate="False" day="30" month="12" year="1899" w:st="on">0.3.3</st1:chsdate></span>
		</p>
		<p>
				<span lang="EN-US">Link: </span>
				<span lang="EN-US">
						<a href="http://www.cs.virginia.edu/%7Eeos" target="_blank">http://www.cs.virginia.edu/~eos</a>
				</span>
		</p>
		<p>
				<span lang="EN-US">Status: beta</span>
		</p>
		<p>
				<span lang="EN-US">Dependency: none</span>
		</p>
		<p>
				<span lang="EN-US">Description:</span>
		</p>
		<p>
				<span lang="EN-US">Eos is an aspect-oriented extension for C# on
Microsoft® .NET Framework™. Eos aims to improve upon the current
aspect-oriented language model in three dimensions. First, it
generalizes aspect instantiation &amp; advice weaving model to
eliminate the need for the work-arounds that are unavoidable today when
aspects are used to express certain crosscutting concerns. Second it
generalizes the join point model. Third it aims to eliminate the
distinction between class and aspect constructs in favor of a single
conceptual building block that combines the expressive capabilities of
current classes and aspects, significantly improving conceptual
integrity and uniformity in language design. </span>
				<span lang="EN-US">The
language is very similar to AspectJ except for constructs which are not
implemented in Eos and constructs which AspectJ does not provides.</span>
		</p>
		<p>
				<st1:place w:st="on">
						<span lang="EN-US">Main</span>
				</st1:place>
				<span lang="EN-US"> Features:</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">AspectJ like extended C# langauage and custom compiler.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">Restrictions:</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Static weaving only.</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Not very stable.</span>
				</span>
		</p>
		<p>
				<a name="_Toc113018383">
						<span lang="EN-US">
								<strong style="font-size: 14pt; font-family: Times New Roman;">
										<span>4.<span> </span></span>
										<span lang="EN-US">Encase</span>
								</strong>
						</span>
				</a>
		</p>
		<p>
				<span lang="EN-US">Version: 0.7</span>
		</p>
		<p>
				<span lang="EN-US">Link: </span>
				<span lang="EN-US">
						<a href="http://theagiledeveloper.com/category/15.aspx" target="_blank">http://theagiledeveloper.com/category/15.aspx</a>
				</span>
		</p>
		<p>
				<span lang="EN-US">Status: beta</span>
		</p>
		<p>
				<span lang="EN-US">Dependency: none</span>
		</p>
		<p>
				<span lang="EN-US">Description:</span>
		</p>
		<p>
				<span lang="EN-US">Encase is an aspect oriented programming
framework for the .NET Platform written in C#. Encase is unique in that
it provides aspects to be applied during runtime in managed code rather
then being configuration file based that other AOP frameworks rely
upon. The advantage of applying aspects in this way is that it promotes
productivity to developers new and/or unfamiliar with AOP.</span>
		</p>
		<p>
				<span lang="EN-US">Restrictions:</span>
		</p>
		<p align="left">
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Encase
cannot mixin multiple classes that implement a shared interface? For
instance, if class A implements Ialphabet, and class B implements
Ialphabet, classes A and B can not both be mixed in as an aspect. </span>
				</span>
		</p>
		<p align="left">
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Encase can only provide interception and aspect weaving to virtual (overriable) methods and properties. </span>
				</span>
		</p>
		<p align="left">
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Encase is unable to apply aspects to sealed (NotInheritable) classes.</span>
				</span>
		</p>
		<p align="left">
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Like Aspect#, but more unstable.</span>
				</span>
		</p>
		<p align="left">
				<a name="_Toc113018384">
						<span lang="EN-US">
								<strong style="font-size: 14pt; font-family: Times New Roman;">
										<span>5.<span> </span></span>
										<span lang="EN-US">Post#</span>
								</strong>
						</span>
				</a>
		</p>
		<p>
				<span lang="EN-US">Version: <st1:chsdate isrocdate="False" islunardate="False" day="30" month="12" year="1899" w:st="on">1.0.0</st1:chsdate>.0</span>
		</p>
		<p>
				<span lang="EN-US">Link: </span>
				<span lang="EN-US">
						<a href="http://gael.fraiteur.net/postsharp.aspx">http://gael.fraiteur.net/postsharp.aspx</a>
				</span>
		</p>
		<p>
				<span lang="EN-US">Status: alpha</span>
		</p>
		<p>
				<span lang="EN-US">Dependency: none</span>
		</p>
		<p>
				<span lang="EN-US">Description:</span>
		</p>
		<p>
				<span lang="EN-US">PostSharp is a <span>free and open-source post-compiler for the .NET Framework</span>.
PostSharp is an extensible platform that makes it easy to develop and
execute static program analysis and program transformation plug-ins.</span>
		</p>
		<p>
				<st1:place w:st="on">
						<span lang="EN-US">Main</span>
				</st1:place>
				<span lang="EN-US"> Features:</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Developped under .Net Framework 2.0 beta</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">There is a very good third pary collection library – “Xipho.Collections” for .Net 2.0 in the source code</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">Restrictions:</span>
		</p>
		<p align="left">
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Not say to be a really aop framework yet.</span>
				</span>
		</p>
		<p align="left">
				<a name="_Toc113018385">
						<span lang="EN-US">
								<strong style="font-size: 14pt; font-family: Times New Roman;">
										<span>6.<span> </span></span>
										<span lang="EN-US">Loom.Net</span>
								</strong>
						</span>
				</a>
		</p>
		<p>
				<span lang="EN-US">
						<span lang="EN-US">Version: <st1:chsdate isrocdate="False" islunardate="False" day="30" month="12" year="1899" w:st="on">1.5 Beta2<br /></st1:chsdate></span>
						<br />Link: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.dcl.hpi.uni-potsdam.de/research/loom/" target="_blank">http://www.dcl.hpi.uni-potsdam<wbr>.de/research/loom/</wbr></a><br /><span lang="EN-US"><br />Status: beta</span></span>
		</p>
		<p>
				<span lang="EN-US">Dependency: none</span>
		</p>
		<p>
				<span lang="EN-US">Description:</span>
		</p>
		<st1:place w:st="on">
				<span lang="EN-US">
						<p>The LOOM .NET project aims to investigate and promote the usage of
AOP in the context of the Microsoft .NET framework. We have been
developing two AOP tools (so called weavers) that all implement
different approaches to weaving: A <a href="http://www.cnblogs.com/teddyma/admin/rapier_loom.htm"><font color="#002c99">runtime weaver</font></a> crating weaved objects on the fly and a <a href="http://www.cnblogs.com/teddyma/admin/gripper_loom.htm"><font color="#002c99">static weaver</font></a>.</p>
						<p>Main</p>
				</span>
		</st1:place>
		<span lang="EN-US"> Features:</span>
		<p>
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Support under .Net Framework 2.0 beta</span>
				</span>
		</p>
		<p>
				<span lang="EN-US">
						<span>-<span> Include both dynamic proxy based dynamic interception and il level rail like static weaving support.</span></span>
				</span>
		</p>
		<p>
				<span lang="EN-US">Restrictions:</span>
		</p>
		<p align="left">
				<span lang="EN-US">
						<span>-<span> </span></span>
						<span lang="EN-US">Not very stable.<br /><br /></span>
				</span>
		</p>
		<p align="left">
				<span lang="EN-US">
						<strong style="font-size: 14pt; font-family: Times New Roman;">
								<span>7.<span> </span></span>
								<span lang="EN-US">Others</span>
						</strong>
				</span>
		</p>
		<span lang="EN-US">
				<span lang="EN-US">
						<st1:chsdate isrocdate="False" islunardate="False" day="30" month="12" year="1899" w:st="on">
						</st1:chsdate>
						<div>
								<span>AspectC# (AspectJ like C# extended compiler)</span>
						</div>
						<div>
								<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.dsg.cs.tcd.ie/index.php?category_id=169" target="_blank">http://www.dsg.cs.tcd.ie/index<wbr>.php?category_id=169</wbr></a>
						</div>
						<div> </div>
						<div>
								<strong>
								</strong>
								<span>
										<span style="color: rgb(0, 0, 66);">
												<span>Weave.NET (provide a load<wbr>-time il level weaving implementing)</wbr></span>
										</span>
								</span>
						</div>
						<div>
								<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.dsg.cs.tcd.ie/index.php?category_id=194" target="_blank">http://www.dsg.cs.tcd.ie/index<wbr>.php?category_id=194</wbr></a>
						</div>
				</span>
		</span>
<img src ="http://www.cppblog.com/giant35/aggbug/10525.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/giant35/" target="_blank">四海</a> 2006-07-26 14:26 <a href="http://www.cppblog.com/giant35/articles/10525.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Libcurl 简明使用指南[转]</title><link>http://www.cppblog.com/giant35/articles/10522.html</link><dc:creator>四海</dc:creator><author>四海</author><pubDate>Wed, 26 Jul 2006 04:04:00 GMT</pubDate><guid>http://www.cppblog.com/giant35/articles/10522.html</guid><wfw:comment>http://www.cppblog.com/giant35/comments/10522.html</wfw:comment><comments>http://www.cppblog.com/giant35/articles/10522.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/giant35/comments/commentRss/10522.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/giant35/services/trackbacks/10522.html</trackback:ping><description><![CDATA[
		<div class="post">
				<h2>原文见http://blog.vckbase.com/michael/archive/2005/11/29/15426.aspx<br /></h2>
				<h2>
						<a id="viewpost1_TitleUrl" href="http://blog.vckbase.com/michael/archive/2005/11/29/15426.html">Libcurl 简明使用指南</a>
				</h2>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">Libcurl<span style="font-family: 宋体;" lang="ZH-CN">为一个免费开源的，客户端</span>url<span style="font-family: 宋体;" lang="ZH-CN">传输库，支持</span>FTP<span style="font-family: 宋体;" lang="ZH-CN">，</span>FTPS<span style="font-family: 宋体;" lang="ZH-CN">，</span>TFTP<span style="font-family: 宋体;" lang="ZH-CN">，</span>HTTP<span style="font-family: 宋体;" lang="ZH-CN">，</span>HTTPS<span style="font-family: 宋体;" lang="ZH-CN">，</span>GOPHER<span style="font-family: 宋体;" lang="ZH-CN">，</span>TELNET<span style="font-family: 宋体;" lang="ZH-CN">，</span>DICT<span style="font-family: 宋体;" lang="ZH-CN">，</span>FILE<span style="font-family: 宋体;" lang="ZH-CN">和</span>LDAP<span style="font-family: 宋体;" lang="ZH-CN">，跨平台，支持</span>Windows<span style="font-family: 宋体;" lang="ZH-CN">，</span>Unix<span style="font-family: 宋体;" lang="ZH-CN">，</span>Linux<span style="font-family: 宋体;" lang="ZH-CN">等，线程安全，支持</span>Ipv6<span style="font-family: 宋体;" lang="ZH-CN">。并且易于使用。</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<a href="http://curl.haxx.se/libcurl/">http://curl.haxx.se/libcurl/</a>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">从</span>http://curl.haxx.se/libcurl/ <span style="font-family: 宋体;" lang="ZH-CN">下载一个稳定的版本，注意选择</span>OS<span style="font-family: 宋体;" lang="ZH-CN">。</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<h3 style="margin: 12pt 0cm 3pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">编译</span>
						<font face="Arial">libcurl</font>
				</h3>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">下载下来的是源码包，需要编译。</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">解压</span>zip<span style="font-family: 宋体;" lang="ZH-CN">文件，进入</span>curl-7.14.0\lib<span style="font-family: 宋体;" lang="ZH-CN">目录（我下载的是</span>7.14.0<span style="font-family: 宋体;" lang="ZH-CN">）。</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">编译</span>Debug<span style="font-family: 宋体;" lang="ZH-CN">版本。新建一个批处理</span>bat<span style="font-family: 宋体;" lang="ZH-CN">文件，如</span>buildDebug.bat<span style="font-family: 宋体;" lang="ZH-CN">，内容如下：</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat"</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">set CFG=debug-dll-ssl-dll-zlib-dll</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">set OPENSSL_PATH=E:\SSL\openssl-0.9.7e</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">set ZLIB_PATH=E:\zip\zlib123</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">nmake -f Makefile.vc6</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">其输出：</span>libcurld_imp.lib, libcurld.dll</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">编译</span>Release<span style="font-family: 宋体;" lang="ZH-CN">版本。新建一个批处理文件</span>BuildRelease.bat<span style="font-family: 宋体;" lang="ZH-CN">，内容如下：</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat"</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">set CFG=release-dll-ssl-dll-zlib-dll</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">set OPENSSL_PATH=E:\SSL\openssl-0.9.7e</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">set ZLIB_PATH=E:\zip\zlib123</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">nmake -f Makefile.vc6 </p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">其输出：</span>libcurl_imp.lib, libcurl.dll</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">上面编译的是</span>libcurl<span style="font-family: 宋体;" lang="ZH-CN">的</span> dll<span style="font-family: 宋体;" lang="ZH-CN">，使用</span>OpenSSL Dll<span style="font-family: 宋体;" lang="ZH-CN">版本和</span>Zlib Dll<span style="font-family: 宋体;" lang="ZH-CN">版本。如果没有，可以从</span><a href="http://www.openssl.org/">www.openssl.org</a><span style="font-family: 宋体;" lang="ZH-CN">或者</span><a href="http://www.zlib.net/">http://www.zlib.net/</a><span style="font-family: 宋体;" lang="ZH-CN">下载。</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">如果需要编译其他版本，可查看</span>Makefile.vc6<span style="font-family: 宋体;" lang="ZH-CN">，设定相应的</span>CFG <span style="font-family: 宋体;" lang="ZH-CN">参数即可。</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">商业软件使用</span>libcurl<span style="font-family: 宋体;" lang="ZH-CN">时，只需要包含其</span>copywrite<span style="font-family: 宋体;" lang="ZH-CN">声明即可。</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> <o:p></o:p></p>
				<h3 style="margin: 12pt 0cm 3pt;">
						<font face="Arial">Sample</font>
				</h3>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"> </p>
				<div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 98%;">
						<div>
								<img src="http://blog.vckbase.com/Images/OutliningIndicators/None.gif" align="top" />
								<span style="color: rgb(0, 0, 0);">#include </span>
								<span style="color: rgb(0, 0, 0);">&lt;</span>
								<span style="color: rgb(0, 0, 0);">stdio.h</span>
								<span style="color: rgb(0, 0, 0);">&gt;</span>
								<span style="color: rgb(0, 0, 0);">
										<br />
										<img src="http://blog.vckbase.com/Images/OutliningIndicators/None.gif" align="top" />#include </span>
								<span style="color: rgb(0, 0, 0);">"</span>
								<span style="color: rgb(0, 0, 0);">../curl-7.14.0/include/curl/curl.h</span>
								<span style="color: rgb(0, 0, 0);">"</span>
								<span style="color: rgb(0, 0, 0);">
										<br />
										<img src="http://blog.vckbase.com/Images/OutliningIndicators/None.gif" align="top" />#pragma comment(lib, </span>
								<span style="color: rgb(0, 0, 0);">"</span>
								<span style="color: rgb(0, 0, 0);">../curl-7.14.0/lib/libcurl_imp.lib</span>
								<span style="color: rgb(0, 0, 0);">"</span>
								<span style="color: rgb(0, 0, 0);">)<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/None.gif" align="top" /></span>
								<span style="color: rgb(0, 0, 255);">int</span>
								<span style="color: rgb(0, 0, 0);"> main(</span>
								<span style="color: rgb(0, 0, 255);">void</span>
								<span style="color: rgb(0, 0, 0);">)<br /><img id="Codehighlighter1_140_826_Open_Image" onclick="this.style.display='none'; Codehighlighter1_140_826_Open_Text.style.display='none'; Codehighlighter1_140_826_Closed_Image.style.display='inline'; Codehighlighter1_140_826_Closed_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_140_826_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_140_826_Closed_Text.style.display='none'; Codehighlighter1_140_826_Open_Image.style.display='inline'; Codehighlighter1_140_826_Open_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
								<span id="Codehighlighter1_140_826_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">
										<img src="http://blog.vckbase.com/Images/dot.gif" />
								</span>
								<span id="Codehighlighter1_140_826_Open_Text">
										<span style="color: rgb(0, 0, 0);">{<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />  curl </span>
										<span style="color: rgb(0, 0, 0);">=</span>
										<span style="color: rgb(0, 0, 0);"> curl_easy_init();<br /><img id="Codehighlighter1_180_812_Open_Image" onclick="this.style.display='none'; Codehighlighter1_180_812_Open_Text.style.display='none'; Codehighlighter1_180_812_Closed_Image.style.display='inline'; Codehighlighter1_180_812_Closed_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_180_812_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_180_812_Closed_Text.style.display='none'; Codehighlighter1_180_812_Open_Image.style.display='inline'; Codehighlighter1_180_812_Open_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top" />  </span>
										<span style="color: rgb(0, 0, 255);">if</span>
										<span style="color: rgb(0, 0, 0);">(curl) </span>
										<span id="Codehighlighter1_180_812_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">
												<img src="http://blog.vckbase.com/Images/dot.gif" />
										</span>
										<span id="Codehighlighter1_180_812_Open_Text">
												<span style="color: rgb(0, 0, 0);">{<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />    CURLcode res;    <br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />    res </span>
												<span style="color: rgb(0, 0, 0);">=</span>
												<span style="color: rgb(0, 0, 0);"> curl_easy_setopt(curl, CURLOPT_PROXY, </span>
												<span style="color: rgb(0, 0, 0);">"</span>
												<span style="color: rgb(0, 0, 0);">Test-pxy08:8080</span>
												<span style="color: rgb(0, 0, 0);">"</span>
												<span style="color: rgb(0, 0, 0);">);<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />    res </span>
												<span style="color: rgb(0, 0, 0);">=</span>
												<span style="color: rgb(0, 0, 0);"> curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />    res </span>
												<span style="color: rgb(0, 0, 0);">=</span>
												<span style="color: rgb(0, 0, 0);"> curl_easy_setopt(curl, CURLOPT_URL, </span>
												<span style="color: rgb(0, 0, 0);">"</span>
												<span style="color: rgb(0, 0, 0);">http://www.vckbase.com</span>
												<span style="color: rgb(0, 0, 0);">"</span>
												<span style="color: rgb(0, 0, 0);">);<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />    res </span>
												<span style="color: rgb(0, 0, 0);">=</span>
												<span style="color: rgb(0, 0, 0);"> curl_easy_perform(curl);<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" /><br /><img id="Codehighlighter1_475_753_Open_Image" onclick="this.style.display='none'; Codehighlighter1_475_753_Open_Text.style.display='none'; Codehighlighter1_475_753_Closed_Image.style.display='inline'; Codehighlighter1_475_753_Closed_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_475_753_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_475_753_Closed_Text.style.display='none'; Codehighlighter1_475_753_Open_Image.style.display='inline'; Codehighlighter1_475_753_Open_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
												<span style="color: rgb(0, 0, 255);">if</span>
												<span style="color: rgb(0, 0, 0);">(CURLE_OK </span>
												<span style="color: rgb(0, 0, 0);">==</span>
												<span style="color: rgb(0, 0, 0);"> res) </span>
												<span id="Codehighlighter1_475_753_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">
														<img src="http://blog.vckbase.com/Images/dot.gif" />
												</span>
												<span id="Codehighlighter1_475_753_Open_Text">
														<span style="color: rgb(0, 0, 0);">{<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />      </span>
														<span style="color: rgb(0, 0, 255);">char</span>
														<span style="color: rgb(0, 0, 0);"> </span>
														<span style="color: rgb(0, 0, 0);">*</span>
														<span style="color: rgb(0, 0, 0);">ct;<br /><img id="Codehighlighter1_499_528_Open_Image" onclick="this.style.display='none'; Codehighlighter1_499_528_Open_Text.style.display='none'; Codehighlighter1_499_528_Closed_Image.style.display='inline'; Codehighlighter1_499_528_Closed_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_499_528_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_499_528_Closed_Text.style.display='none'; Codehighlighter1_499_528_Open_Image.style.display='inline'; Codehighlighter1_499_528_Open_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top" />      </span>
														<span id="Codehighlighter1_499_528_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span>
														<span id="Codehighlighter1_499_528_Open_Text">
																<span style="color: rgb(0, 128, 0);">/*</span>
																<span style="color: rgb(0, 128, 0);"> ask for the content-type </span>
																<span style="color: rgb(0, 128, 0);">*/</span>
														</span>
														<span style="color: rgb(0, 0, 0);">
																<br />
																<img id="Codehighlighter1_536_593_Open_Image" onclick="this.style.display='none'; Codehighlighter1_536_593_Open_Text.style.display='none'; Codehighlighter1_536_593_Closed_Image.style.display='inline'; Codehighlighter1_536_593_Closed_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
																<img id="Codehighlighter1_536_593_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_536_593_Closed_Text.style.display='none'; Codehighlighter1_536_593_Open_Image.style.display='inline'; Codehighlighter1_536_593_Open_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top" />      </span>
														<span id="Codehighlighter1_536_593_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span>
														<span id="Codehighlighter1_536_593_Open_Text">
																<span style="color: rgb(0, 128, 0);">/*</span>
																<span style="color: rgb(0, 128, 0);"> </span>
																<span style="font-weight: bold; color: rgb(0, 128, 0);">http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html </span>
																<span style="color: rgb(0, 128, 0);">*/</span>
														</span>
														<span style="color: rgb(0, 0, 0);">
																<br />
																<img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />      res </span>
														<span style="color: rgb(0, 0, 0);">=</span>
														<span style="color: rgb(0, 0, 0);"> curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, </span>
														<span style="color: rgb(0, 0, 0);">&amp;</span>
														<span style="color: rgb(0, 0, 0);">ct);<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />      </span>
														<span style="color: rgb(0, 0, 255);">if</span>
														<span style="color: rgb(0, 0, 0);">((CURLE_OK </span>
														<span style="color: rgb(0, 0, 0);">==</span>
														<span style="color: rgb(0, 0, 0);"> res) </span>
														<span style="color: rgb(0, 0, 0);">&amp;&amp;</span>
														<span style="color: rgb(0, 0, 0);"> ct)<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />        printf(</span>
														<span style="color: rgb(0, 0, 0);">"</span>
														<span style="color: rgb(0, 0, 0);">We received Content-Type: %s </span>
														<span style="color: rgb(0, 0, 0);">"</span>
														<span style="color: rgb(0, 0, 0);">, ct);<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
												</span>
												<span style="color: rgb(0, 0, 0);">
														<br />
														<img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />
														<br />
														<img id="Codehighlighter1_760_779_Open_Image" onclick="this.style.display='none'; Codehighlighter1_760_779_Open_Text.style.display='none'; Codehighlighter1_760_779_Closed_Image.style.display='inline'; Codehighlighter1_760_779_Closed_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_760_779_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_760_779_Closed_Text.style.display='none'; Codehighlighter1_760_779_Open_Image.style.display='inline'; Codehighlighter1_760_779_Open_Text.style.display='inline';" src="http://blog.vckbase.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
												<span id="Codehighlighter1_760_779_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span>
												<span id="Codehighlighter1_760_779_Open_Text">
														<span style="color: rgb(0, 128, 0);">/*</span>
														<span style="color: rgb(0, 128, 0);"> always cleanup </span>
														<span style="color: rgb(0, 128, 0);">*/</span>
												</span>
												<span style="color: rgb(0, 0, 0);">
														<br />
														<img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />    curl_easy_cleanup(curl);<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />  }</span>
										</span>
										<span style="color: rgb(0, 0, 0);">
												<br />
												<img src="http://blog.vckbase.com/Images/OutliningIndicators/InBlock.gif" align="top" />  </span>
										<span style="color: rgb(0, 0, 255);">return</span>
										<span style="color: rgb(0, 0, 0);"> </span>
										<span style="color: rgb(0, 0, 0);">0</span>
										<span style="color: rgb(0, 0, 0);">;<br /><img src="http://blog.vckbase.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
								</span>
						</div>
				</div>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<o:p>
						</o:p>
				</p>
				<h3 style="margin: 12pt 0cm 3pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">已知</span>
						<font face="Arial">bugs</font>
				</h3>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">
						<span style="font-family: 宋体;" lang="ZH-CN">不支持</span>SOCKS4<span style="font-family: 宋体;" lang="ZH-CN">。</span></p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">SOCKS5<span style="font-family: 宋体;" lang="ZH-CN">实现有缺陷，导致必须设置用户和密码。</span></p>
				<span style="font-size: 12pt; font-family: 宋体;" lang="ZH-CN">连接</span>
				<span style="font-size: 12pt; font-family: 'Times New Roman';">proxy</span>
				<span style="font-size: 12pt; font-family: 宋体;" lang="ZH-CN">过程不能设置超时。</span>
				<p class="postfoot">
			posted on 2005-11-29 17:03 Michael 阅读(1072) <a href="http://blog.vckbase.com/michael/archive/2005/11/29/15426.aspx#Post">评论(2)</a>  <a href="http://blog.vckbase.com/michael/admin/EditPosts.aspx?postid=15426">编辑</a> <a href="http://blog.vckbase.com/michael/AddToFavorite.aspx?id=15426">收藏</a></p>
		</div>
<img src ="http://www.cppblog.com/giant35/aggbug/10522.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/giant35/" target="_blank">四海</a> 2006-07-26 12:04 <a href="http://www.cppblog.com/giant35/articles/10522.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>类库大评比之GUI篇</title><link>http://www.cppblog.com/giant35/articles/9788.html</link><dc:creator>四海</dc:creator><author>四海</author><pubDate>Thu, 13 Jul 2006 04:32:00 GMT</pubDate><guid>http://www.cppblog.com/giant35/articles/9788.html</guid><wfw:comment>http://www.cppblog.com/giant35/comments/9788.html</wfw:comment><comments>http://www.cppblog.com/giant35/articles/9788.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/giant35/comments/commentRss/9788.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/giant35/services/trackbacks/9788.html</trackback:ping><description><![CDATA[
		<div id="gnid3106_5" class="NoteContents" style="font-family: arial,sans-serif; font-size: 83%;">
				<blockquote style="margin-top: 0.25ex;" class="gn_bq">
						<p style="margin-top: 0pt;">1、GTK+  (Gtkmm)<br /></p>
						<p>
								<a href="http://www-128.ibm.com/developerworks/cn/opensource/os-gtk1/">GTK+基础</a>
						</p>
						<p>GTK+最初是GIMP的专用开发库，后来发展为Linux下开发图形界面的应用程序的主流开发工具之一。GTK+2.0是自由软件，并且是GNU工程的一部分。GTK+2.0的许可协议是LGPL。</p>
						<p>GTK+使用C语言开发，但是其设计者使用面向对象技术。 在GNOME平台上提供了C++(gtkmm)、Perl、Ruby、Java和Python(PyGTK)绑定，其他的绑定有Ada、 D、 Haskell、PHP和所有的.NET编程语言。</p>
						<p>与其他很多部件工具箱不同，GTK+并不基于Xt。这一决策优劣互见：优点是GTK+可以应用于其他系统，其灵活性也很强；而缺点就是它无法利用以传统方法为X11定制的X资源数据库。</p>
						<p>Glade是一个界面设计工具，但是它也包含了一种描述GUI界面的XML语言，它和libglade一起工作就可以直接使用GTK和GNOME控件。</p>
						<p>2、Qt</p>
						<p>
								<a href="http://www-128.ibm.com/developerworks/cn/linux/guitoolkit/qt/overview/">Qt简介</a>
						</p>
						<p>Qt是Trolltech公司的一个产品。 <br />Qt是一个多平台的C++图形用户界面应用程序框架。它提供给应用程序开发者建立艺术级的图形用户界面所需的所用功能。Qt是完全面向对象的很容易扩展，并且 允许真正地组件编程。 </p>
						<p>自从1996年早些时候，Qt进入商业领域，它已经成为全世界范围内数千种成功的应用 程序的基础。Qt也是流行的Linux桌面环境KDE 的基础，KDE是所有主要的Linux发行版的一个标准组件。 </p>
						<p>Qt支持下述平台： MS/Windows - 95、98、NT 4.0、ME、和2000 <br />Unix/X11 - Linux、Sun Solaris、HP-UX、Compaq Tru64 UNIX、IBM AIX、SGI IRIX和其它很多X11平台 <br />Macintosh - Mac OS X <br />Embedded - 有帧缓冲(framebuffer)支持的Linux平台。 </p>
						<p>3、wxWidgets</p>
						<p>开源软件（LGPL），针对C++、Python以及Perl的跨平台工具集。</p>
						<p>详细介绍，参见<a href="http://www-128.ibm.com/developerworks/cn/linux/sdk/python/wxwin/index.html">细述 wxWindows</a><br />wxWidget作为一个C++ GUI Library从1992发展到现在，已经在全球范围内产生了极大的影响力，利用这个类库进行GUI开发的软件更是不计其数。</p>
						<p>wxWidgets原名wxWindows，是由Julian Smart于1992年还在英国爱丁堡大学人工智能应用研究所开始的一个项目。Julian Smart现在是Anthemion软件公司的技术总监。</p>
						<p>简单地说，wxWidgets提供了用于可在多平台上开发GUI应用程序的一整套简单易学易用的API。wxWidgets支持的多平台包括<br />
Windows 3.1/95/98/NT/2000/XP、带有Motif<br />
1.2版本以上的Unix、带有GTK+的Unix/Linux/*BSD、Mac等等。开发者只需要用自己使用的系统平台的编译器编译源程序，并链接上<br />
相应的库文件，生成的程序代码即具有该平台的外观和界面。在这些GUI之上，wxWidgets还提供了在线帮助、网络编程、流处理、多种常用图形格式支<br />
持、数据库支持、HTML察看和打印，等等各种强大的功能。</p>
						<p>wxWidgets支持的Windows上的多种流行编译器包括：<br />Visual C++ 1.5, 4.0, 5.0, 6.0 <br />Borland C++ 4.5, 5.0 <br />Borland C++ Builder 1.0, 3.0 <br />Watcom C++ 10.6 (Win32) <br />Cygwin <br />MinGW32 <br />Metrowerks CodeWarrior 4</p>
						<p>4、Fox</p>
						<p>
								<b>
What is FOX?
<br /><img src="http://www.fox-toolkit.org/art/line.gif" height="1" width="100%" /></b>
						</p>
						<ul>
								<p>
										<b>FOX</b> is a C++ based Toolkit for developing Graphical User Interfaces easily and
  effectively. It offers a wide, and growing, collection of Controls, and provides
  state of the art facilities such as drag and drop, selection, as well as OpenGL
  widgets for 3D graphical manipulation.  FOX also implements icons, images, and
  user-convenience features such as status line help, and tooltips.
  Tooltips may even be used for 3D objects!
  </p>
								<p>
  Considerable importance has been placed on making FOX one of the fastest
  toolkits around, and to minimize memory use:- FOX uses a number of techniques
  to speed up drawing and spatial layout of the GUI.  Memory is conserved by
  allowing programmers to create and destroy GUI elements on the fly.
  </p>
								<p>
  Even though FOX offers a large collection of Controls already, FOX leverages C++
  to allow programmers to easily build additional Controls and GUI elements,
  simply by taking existing controls, and creating a derived class which simply
  adds or redefines the desired behavior.
  </p>
								<p>
  One of the prime design goals of FOX is the ease of programming; thus, most
  controls can be created using a single line of C++ code; most parameters have
  sensible default values, so that they may be omitted, and layout managers ensure
  that designers of GUI's do not have to worry about precise alignments.
  </p>
								<p>
  Another nice feature of FOX which significantly reduces the number of lines of
  code which have to be written is FOX's ability to have widgets connect to each
  other, and passing certain commands between them; for example, a menu entry Hide
  Toolbar can be directly connected to the Toolbar, and cause it to hide.
  </p>
								<p>
  Finally, FOX makes it easy to maintain the state of the GUI in an application
  by having the GUI elements automatically updating themselves by interrogating
  the application's state.  This feature eliminates the large amount of effort that
  may go into sensitizing, graying out, checking/unchecking etc. depending on
  the application state.
</p>
						</ul>
						<!--- TOPIC TITLE -->
						<p>
						</p>
						<table cellpadding="0" cellspacing="2" width="100%">
								<tbody>
										<tr>
												<td id="HEADLINE" valign="bottom" width="100%">
														<b>
FOX is Platform Independence!
<br /><img src="http://www.fox-toolkit.org/art/line.gif" height="1" width="100%" /></b>
												</td>
										</tr>
								</tbody>
						</table>
						<!--- TOPIC TITLE -->
						<ul>
								<p>The list of platforms is growing! Currently, we have FOX
running on a large number of operating systems, ranging from Linux,
FreeBSD, SGI IRIX, HP-UX, IBM AIX, SUN Solaris, DEC/Compaq Tru64 UNIX,
to MS-Window operating systems like Windows 9x, Windows NT, Windows ME
and Windows 2000. Since most of the FOX implementation is completely
oblivious to the underlying platform (in many cases it is not even
including header files), applications work virtually identically on all
these platforms.</p>
								<p>For example, <a href="http://www.fox-toolkit.org/art/wintextedit.png">here</a> is the FOX textedit sample application running under <b><i>Windows NT</i></b>.  And <a href="http://www.fox-toolkit.org/art/sgitextedit.png">here</a> is the same application running on a <b><i><a href="http://www.sgi.com/">Silicon
  Graphics</a></i></b><b><i>Octane</i></b> system.</p>
						</ul>
						<br />
						<p>
								<br />
						</p>
						<br />
						<p>
								<br />
						</p>
						<br />
						<p>
								<br />
						</p>
						<p>个人比较喜欢Gtkmm，代码比较干净，只有GUI，但在Windows下的效果似乎没有原生的Window控件好</p>
						<h2>Features</h2>
						<ul>
								<li>Use inheritance to derive custom widgets.</li>
								<li>Type-safe signal handlers, in standard C++.</li>
								<li>Polymorphism.</li>
								<li>Use of Standard C++ Library, including strings, containers, and iterators.</li>
								<li>Full internationalisation with UTF8.</li>
								<li>Complete C++ memory management
        <ul><li>Object composition</li><li>Automatic deallocation of dynamically allocated widgets.</li></ul></li>
								<li>Full use of C++ namespaces.</li>
								<li>No macros.</li>
								<li>Cross-platform:
Linux (gcc), FreeBSD (gcc), NetBSD (gcc), Solaris (gcc, Forte), Win32
(gcc, MSVC++ .Net 2003), MacOS X (gcc), others</li>
								<li>Free software and free of cost for both Open Source and
        proprietary development.</li>
								<li>Discussed, designed and implemented in public.</li>
						</ul>
				</blockquote>
		</div>
<img src ="http://www.cppblog.com/giant35/aggbug/9788.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/giant35/" target="_blank">四海</a> 2006-07-13 12:32 <a href="http://www.cppblog.com/giant35/articles/9788.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>