Manual Building with g++: Difference between revisions

From NEOSYS Dev Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://exowufo.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
----
=[http://exowufo.co.cc CLICK HERE]=
----
</div>
To give some insight into the automatic procedure.
To give some insight into the automatic procedure.


Line 38: Line 46:
http://www.ibm.com/developerworks/library/l-shobj/
http://www.ibm.com/developerworks/library/l-shobj/


  ldd libexodus.so.1.0|grep "not found"
  ldd libexodus.so.1.0|grep &quot;not found&quot;
  ldd -u libexodus.so.1.0
  ldd -u libexodus.so.1.0



Revision as of 02:09, 24 November 2010


To give some insight into the automatic procedure.

Building

get into the source code

cd ~/exodus/trunk/exodus/exodus/exodus

Copy the headers to a standard include path

#include files
sudo cp exo*.h /usr/include
sudo cp mv*.h /usr/include

Compile (Ignore three warnings in /boost/thread/tss.hpp included from mvdbpostgres.cpp)

g++ -fPIC -c *.cpp
gcc -fPIC -c *.c

Link and output the library file

g++ -shared -o libexodus.so.1.0 *.o -lc -lpq -lboost_filesystem-gcc41-mt -lboost_regex-gcc41-mt\
 -lboost_thread-gcc41-mt -Wl,-soname,libexodus.so.1

Installing

This will place the libraries so that you can compile from anywhere on the system

#copy to a standard library folder
sudo cp libexodus.so.1.0 /usr/lib
#register the library file with the linux library cache
sudo ldconfig -v
#create the pointer to version 1
sudo ln -sf /usr/lib/libexodus.so.1 /usr/lib/libexodus.so

Checking the Build

http://www.ibm.com/developerworks/library/l-shobj/

ldd libexodus.so.1.0|grep "not found"
ldd -u libexodus.so.1.0

Testing libexodus

g++ test.cpp -lexodus
./a.out
ldd -u a.out