The procedure is as follows:
1. Download sdl_draw(sdl_draw-1.2.13.tar.gz) Open Source package (http://sdl-draw.sourceforge.net /)
2. Compile and install Open-source packages
Sudo./configure
Loading cache./config. Cache
Checking for a BSD compatible install... (cached)/usr/bin/install-C
Checking whether build environment is sane... yes
Checking whether make sets $ {make}... (cached) Yes
Checking for working aclocal-1.4... missing
Checking for working Autoconf... Found
Checking for working automake-1.4... missing
Checking for working autoheader... Found
Checking for working makeinfo... missing
Checking host system type... i686-pc-linux-gnu
Checking build system type... i686-pc-linux-gnu
Checking for ranlib... (cached) ranlib
Checking for GCC... (cached) GCC
Checking whether the C compiler (GCC) works... yes
Checking whether the C compiler (GCC) is a cross-compiler... no
Checking whether we are using gnu c... (cached) Yes
Checking whether GCC accepts-G... (cached) Yes
Checking for LD used by GCC... (cached)/usr/bin/LD
Checking if the linker (/usr/bin/LD) is GNU lD... (cached) Yes
Checking for BSD-compatible nm... (cached)/usr/bin/nm-B
Checking whether ln-s works... (cached) Yes
Loading cache./config. cache within ltconfig
Checking for object suffix... o
Checking for executable suffix... (cached) No
Checking for GCC option to produce pic...-FPIC
Checking if GCC pic flag-FPIC works... yes
Checking if GCC supports-c-o file. O... yes
Checking if GCC supports-c-o file. Lo... yes
Checking if GCC supports-fno-rtti-fno-exceptions... no
Checking if GCC static flag-static works...-static
Checking if the linker (/usr/bin/LD) is GNU lD... yes
Checking whether the linker (/usr/bin/LD) supports shared libraries... yes
Checking command to parse/usr/bin/nm-B output... OK
Checking how to hardcode library Paths into programs... immediate
Checking for/usr/bin/LD option to reload object files...-R
Checking dynamic linker characteristics... Linux lD. So
Checking if libtool supports shared libraries... yes
Checking whether to build shared libraries... yes
Checking whether to build static libraries... yes
Checking for objdir... libs
Creating libtool
Loading cache./config. Cache
Checking for GCC... (cached) GCC
Checking whether the C compiler (GCC-g-O2) works... yes
Checking whether the C compiler (GCC-g-O2) is a cross-compiler... no
Checking whether we are using gnu c... (cached) Yes
Checking whether GCC accepts-G... (cached) Yes
Checking for ranlib... (cached) ranlib
Checking target system type... i686-pc-linux-gnu
Checking for SDL-config... (cached)/usr/bin/SDL-config
Checking for SDL-version> = 1.2.0... yes
Creating./config. Status
Creating makefile
Creating src/makefile
Sudo make
Making all in SRC
Make [1]: Entering directory '/home/fangl/SDL_draw-1.2.13/src'
/Bin/sh .. /libtool -- mode = compile gcc-dpackage = \ "sdl_draw \"-dversion = \ "1.2.1 \"-I. -I. 'sdl-config -- cflags '-I .. /include-g-O2-I/usr/include/SDL-d_gnu_source = 1-d_reentrant-C sdl_draw.c
Rm-F. libs/sdl_draw.lo
Gcc-dpackage = \ "sdl_draw \"-dversion = \ "1.2.1 \"-I. -I. -I/usr/include/SDL-d_gnu_source = 1-d_reentrant-I .. /include-g-O2-I/usr/include/SDL-d_gnu_source = 1-d_reentrant-WP,-MD ,. deps/sdl_draw.pp-C sdl_draw.c-FPIC-dpic-o. libs/sdl_draw.lo
Gcc-dpackage = \ "sdl_draw \"-dversion = \ "1.2.1 \"-I. -I. -I/usr/include/SDL-d_gnu_source = 1-d_reentrant-I .. /include-g-O2-I/usr/include/SDL-d_gnu_source = 1-d_reentrant-WP,-MD ,. deps/sdl_draw.pp-C sdl_draw.c-O sdl_draw.o>/dev/null 2> & 1
MV-F. libs/sdl_draw.lo
/Bin/sh .. /libtool -- mode = link GCC-g-O2-I/usr/include/SDL-d_gnu_source = 1-d_reentrant-O libsdl_draw.la-rpath/usr/local/lib-Release 1.2- version-Info sdl_draw.lo-L/usr/lib-lsdl
Rm-Fr. libs/libsdl_draw.la. libs/libsdl_draw. *. libs/libSDL_draw-1.2 .*
Gcc-shared sdl_draw.lo-L/usr/lib-lsdl-LC-wl,-soname-wl, libSDL_draw-1.2.so.0-o. libs/libSDL_draw-1.2.so.0.0.1
(CD. libs & Rm-F libSDL_draw-1.2.so.0 & ln-s libSDL_draw-1.2.so.0.0.1 libSDL_draw-1.2.so.0)
(CD. libs & Rm-F libsdl_draw.so & ln-s libSDL_draw-1.2.so.0.0.1 libsdl_draw.so)
Ar cru. libs/libsdl_draw.a sdl_draw.o
Ranlib. libs/libsdl_draw.a
Creating libsdl_draw.la
(CD. libs & Rm-F libsdl_draw.la & ln-S ../libsdl_draw.la)
Make [1]: Leaving directory '/home/fangl/SDL_draw-1.2.13/src'
Make [1]: Entering directory '/home/fangl/SDL_draw-1.2.13'
Make [1]: Nothing to be done for 'all-am '.
Make [1]: Leaving directory '/home/fangl/SDL_draw-1.2.13'
Sudo make install
Making Install in SRC
Make [1]: Entering directory '/home/fangl/SDL_draw-1.2.13/src'
Make [2]: Entering directory '/home/fangl/SDL_draw-1.2.13/src'
/Bin/sh ../mkinstalldirs/usr/local/lib
/Bin/sh ../libtool -- mode = install/usr/bin/install-C libsdl_draw.la/usr/local/lib/libsdl_draw.la
/Usr/bin/install-C. libs/libSDL_draw-1.2.so.0.0.1/usr/local/lib/libSDL_draw-1.2.so.0.0.1
(CD/usr/local/lib & Rm-F libSDL_draw-1.2.so.0 & ln-s libSDL_draw-1.2.so.0.0.1 libSDL_draw-1.2.so.0)
(CD/usr/local/lib & Rm-F libsdl_draw.so & ln-s libSDL_draw-1.2.so.0.0.1 libsdl_draw.so)
/Usr/bin/install-C. libs/libsdl_draw.lai/usr/local/lib/libsdl_draw.la
/Usr/bin/install-C. libs/libsdl_draw.a/usr/local/lib/libsdl_draw.a
Ranlib/usr/local/lib/libsdl_draw.a
Chmod 644/usr/local/lib/libsdl_draw.a
Path = "$ path:/sbin" ldconfig-N/usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/Usr/local/lib
If you ever happen to want to link against installed Libraries
In a given directory, libdir, you must either use libtool, and
Specify the full pathname of the library, or use '-llibdir'
Flag during linking and do at least one of the following:
-Add libdir to the 'LD _ LIBRARY_PATH 'environment variable
During execution
-Add libdir to the 'LD _ run_path 'environment variable
During linking
-Use the '-wl, -- rpath-wl, libdir' linker flag
-Have your system administrator add libdir to '/etc/lD. So. conf'
See any operating system documentation about shared libraries
More information, such as the LD (1) and LD. So (8) manual pages.
----------------------------------------------------------------------
Make [2]: Nothing to be done for 'Install-data-am '.
Make [2]: Leaving directory '/home/fangl/SDL_draw-1.2.13/src'
Make [1]: Leaving directory '/home/fangl/SDL_draw-1.2.13/src'
Make [1]: Entering directory '/home/fangl/SDL_draw-1.2.13'
Make [2]: Entering directory '/home/fangl/SDL_draw-1.2.13'
Make [2]: Nothing to be done for 'Install-Exec-am '.
Make [2]: Nothing to be done for 'Install-data-am '.
Make [2]: Leaving directory '/home/fangl/SDL_draw-1.2.13'
Make [1]: Leaving directory '/home/fangl/SDL_draw-1.2.13'
In this way, the sdl_draw open-source package is successfully installed.
Note: The files after compilation and installation are stored in the default directory:/usr/local/lib.
Installation File:
LibSDL_draw-1.2.so.0 libsdl_draw.a libsdl_draw.so
LibSDL_draw-1.2.so.0.0.1 libsdl_draw.la
3. Environment Configuration
Here, I copy the above five files libsdl_draw * To/usr/lib. (Why? Because the libsdl_image and libsdl_gfx of SDL are all in this directory, they do not need to be compiled differently from the SDL path)
Note: It is troublesome to add a path to the export on the Internet as a temporary path and add the path to the above compilation command.
4. Do not forget to add sdl_draw.h.
After the configuration is completed, a file named sdl_draw.h is missing, which can be found online. Finally, copy sdl_draw.h to the/usr/include/SDL directory.
Compile and run: G ++-O temp. cpp 'sdl-config -- cflags -- libs'-lsdl_draw