From defc003c9167c859fde9027f33c83541362cea98 Mon Sep 17 00:00:00 2001 From: scuri Date: Mon, 22 Nov 2010 20:38:02 +0000 Subject: *** empty log message *** --- html/en/building.html | 61 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 24 deletions(-) (limited to 'html') diff --git a/html/en/building.html b/html/en/building.html index 4c4b564..39114bb 100644 --- a/html/en/building.html +++ b/html/en/building.html @@ -59,20 +59,32 @@ cd xxxx [copy the downloaded files, to the xxxx directory] -tar -xpvzf iup-3.2_Sources.tar.gz -tar -xpvzf cd-5.4_Sources.tar.gz +tar -xpvzf lua5_1_4_Sources.tar.gz [optional, see note bellow] tar -xpvzf im-3.6.2_Sources.tar.gz -tar -xpvzf lua5_1_4_Sources.tar.gz [optional, see note bellow] +tar -xpvzf cd-5.4_Sources.tar.gz +tar -xpvzf iup-3.2_Sources.tar.gz +

If you are going to build all the libraries, the makefiles and projects expect the following directory tree:

/xxxx/
-      cd/
+      lua5.1/    [optional, see note bellow]
       im/
-      iup/
-      lua5.1/    [optional, see note bellow]
+ cd/ + iup/

If you unpack all the source packages in the same directory, that structure will be automatically created.

+

If you want to use some of these libraries that are installed on the system +(see Installation section bellow) you will have to define some environment +variables before building them. For example:

+
export IM_INC=/usr/include/im
+export IM_LIB=/usr/lib           [not necessary, already included by gcc]
+
+export CD_INC=/usr/include/cd
+export CD_LIB=/usr/lib           [not necessary, already included by gcc]
+
+export IUP_INC=/usr/include/iup
+export IUP_LIB=/usr/lib          [not necessary, already included by gcc]

Lua

Although we use Lua from LuaBinaries, any Lua installation can also be used. In Ubuntu, the Lua run time package is:

@@ -115,9 +127,9 @@ in Source Forge, with "xxx-X.X_Linux26g4_lib"xxx-X.X_Linux26g4_64_lib.tar.gz" names.

Do not extract different pre-compiled binaries in the same directory, create a subdirectory for each one, for example:

-
mkdir iup
-cd iup
-tar -xpvzf ../iup-3.2_Linux26g4_lib.tar.gz
+
mkdir im
+cd im
+tar -xpvzf ../im-3.6.2_Linux26g4_lib.tar.gz
 cd ..
 
 mkdir cd
@@ -125,11 +137,10 @@ cd cd
 tar -xpvzf ../cd-5.4_Linux26g4_lib.tar.gz
 cd ..
 
-mkdir im
-cd im
-tar -xpvzf ../im-3.6.2_Linux26g4_lib.tar.gz
+mkdir iup
+cd iup
+tar -xpvzf ../iup-3.2_Linux26g4_lib.tar.gz
 cd ..
-
 

For the installation instructions bellow, remove the "lib/Linux26g4" from the following examples if you are using the pre-compiled binaries.

@@ -137,23 +148,25 @@ following examples if you are using the pre-compiled binaries.

After building you can copy the libraries files to the system directory. If you are inside the main directory, to install the run time libraries you can type, for example:

-
sudo cp -f iup/lib/Linux26g4/*.so /usr/lib               [script version: install ]
-sudo cp -f cd/lib/Linux26g4/*.so /usr/lib                               
-sudo cp -f im/lib/Linux26g4/*.so /usr/lib
+
sudo cp -f im/lib/Linux26g4/*.so /usr/lib               [script version: install ]
+sudo cp -f cd/lib/Linux26g4/*.so /usr/lib
+sudo cp -f iup/lib/Linux26g4/*.so /usr/lib
+

To install the development files, then do:

-
sudo mkdir -p /usr/include/iup                           [script version: install_dev ]
-sudo cp -f iup/include/*.h /usr/include/iup             
-sudo cp -f iup/lib/Linux26g4/*.a /usr/lib                               
+
sudo mkdir -p /usr/include/im                           [script version: install_dev ]
+sudo cp -fR im/include/*.h /usr/include/im
+sudo cp -f im/lib/Linux26g4/*.a /usr/lib
 
 sudo mkdir -p /usr/include/cd
 sudo cp -f cd/include/*.h /usr/include/cd
 sudo cp -f cd/lib/Linux26g4/*.a /usr/lib
 
-sudo mkdir -p /usr/include/im
-sudo cp -fR im/include/*.h /usr/include/im
-sudo cp -f im/lib/Linux26g4/*.a /usr/lib
-

Then in your makefile use -Iiup -Icd -Iim for includes. There is no need to +sudo mkdir -p /usr/include/iup +sudo cp -f iup/include/*.h /usr/include/iup +sudo cp -f iup/lib/Linux26g4/*.a /usr/lib +

+

Then in your makefile use -Iim -Icd -Iiup for includes. There is no need to specify the libraries directory with -L. Development files are only necessary if you are going to compile an application or library in C/C++ that uses there libraries. To just run Lua scripts they are not necessary.

@@ -162,7 +175,7 @@ libraries. To just run Lua scripts they are not necessary.

directory, you can use them from build directory. You will need to add the run time libraries folders to the LD_LIBRARY_PATH, for example:

-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/xxxx/iup/lib/Linux26g4:/xxxx/cd/lib/Linux26g4:/xxxx/im/lib/Linux26g4
+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/xxxx/im/lib/Linux26g4:/xxxx/cd/lib/Linux26g4:/xxxx/iup/lib/Linux26g4

And in your makefile will will also need to specify those paths when linking using -L/xxxx/iup/lib/Linux26g4, and for compiling use -I/xxxx/iup/include.

-- cgit v1.2.3