Static build eclipse setup

Hello,

I have made the static build libRoot.a and am planning to build my standalone application using Eclipse. What’s the environment configuration? Is it simply add the -lRoot into the linker and the headers file in the include directory? I have tried, but doesn’t work.

Maybe I have missed something. So may I have the configuration file or guidence?

Here are the error msg:

**** Build of configuration Debug for project TestRoot ****

make all 
Building file: ../src/TestRoot.cpp
Invoking: GCC C++ Compiler
g++ -I"/home/jay/workspace/TestRoot/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/TestRoot.d" -MT"src/TestRoot.d" -o"src/TestRoot.o" "../src/TestRoot.cpp"
Finished building: ../src/TestRoot.cpp
 
Building target: TestRoot
Invoking: GCC C++ Linker
g++ -L"/home/jay/workspace/TestRoot/lib" -o"TestRoot"  ./src/TestRoot.o   -lRoot
/home/jay/workspace/TestRoot/lib/libRoot.a(shl.o): In function `G__dladdr':
shl.cxx:(.text+0x1a8): undefined reference to `dladdr'
/home/jay/workspace/TestRoot/lib/libRoot.a(shl.o): In function `G__shl_findsym':
shl.cxx:(.text+0x1435): undefined reference to `dlsym'
shl.cxx:(.text+0x143d): undefined reference to `dlerror'
shl.cxx:(.text+0x1442): undefined reference to `dlerror'
/home/jay/workspace/TestRoot/lib/libRoot.a(shl.o): In function `G__dlopen':
shl.cxx:(.text+0x39e8): undefined reference to `dlopen'
shl.cxx:(.text+0x3b06): undefined reference to `dlerror'
/home/jay/workspace/TestRoot/lib/libRoot.a(shl.o): In function `G__dlclose':
shl.cxx:(.text+0x11b6): undefined reference to `dlclose'
/home/jay/workspace/TestRoot/lib/libRoot.a(TPRegexp.o): In function `TPRegexp::~TPRegexp()':
TPRegexp.cxx:(.text+0x65): undefined reference to `pcre_free'
TPRegexp.cxx:(.text+0x7b): undefined reference to `pcre_free'
/home/jay/workspace/TestRoot/lib/libRoot.a(TPRegexp.o): In function `TPRegexp::operator=(TPRegexp const&)':
TPRegexp.cxx:(.text+0x25d): undefined reference to `pcre_free'
TPRegexp.cxx:(.text+0x27a): undefined reference to `pcre_free'
/home/jay/workspace/TestRoot/lib/libRoot.a(TPRegexp.o): In function `TPRegexp::MatchInternal(TString const&, int, int, TArrayI*)':
TPRegexp.cxx:(.text+0x553): undefined reference to `pcre_exec'
/home/jay/workspace/TestRoot/lib/libRoot.a(TPRegexp.o): In function `TPRegexp::Optimize()':
TPRegexp.cxx:(.text+0x6e9): undefined reference to `pcre_free'
TPRegexp.cxx:(.text+0x724): undefined reference to `pcre_study'
/home/jay/workspace/TestRoot/lib/libRoot.a(TPRegexp.o): In function `TPRegexp::Compile()':
TPRegexp.cxx:(.text+0x7ba): undefined reference to `pcre_free'
TPRegexp.cxx:(.text+0x813): undefined reference to `pcre_compile'
/home/jay/workspace/TestRoot/lib/libRoot.a(TPRegexp.o): In function `TPRegexp::SubstituteInternal(TString&, TString const&, int, int, bool)':
TPRegexp.cxx:(.text+0x134f): undefined reference to `pcre_exec'
/home/jay/workspace/TestRoot/lib/libRoot.a(TUnixSystem.o): In function `SetRootSys()':
TUnixSystem.cxx:(.text+0x3e66): undefined reference to `dladdr'
/home/jay/workspace/TestRoot/lib/libRoot.a(TUnixSystem.o): In function `TUnixSystem::StackTrace()':
TUnixSystem.cxx:(.text+0x94ad): undefined reference to `dladdr'
/home/jay/workspace/TestRoot/lib/libRoot.a(ZDeflate.o): In function `R__zipMultipleAlgorithm':
ZDeflate.c:(.text+0x2537): undefined reference to `deflateInit_'
ZDeflate.c:(.text+0x254c): undefined reference to `deflate'
ZDeflate.c:(.text+0x255d): undefined reference to `deflateEnd'
ZDeflate.c:(.text+0x26a4): undefined reference to `deflateEnd'
/home/jay/workspace/TestRoot/lib/libRoot.a(ZipLZMA.o): In function `R__unzipLZMA':
ZipLZMA.c:(.text+0x55): undefined reference to `lzma_stream_decoder'
ZipLZMA.c:(.text+0x88): undefined reference to `lzma_code'
ZipLZMA.c:(.text+0xaf): undefined reference to `lzma_end'
ZipLZMA.c:(.text+0xf4): undefined reference to `lzma_end'
/home/jay/workspace/TestRoot/lib/libRoot.a(ZipLZMA.o): In function `R__zipLZMA':
ZipLZMA.c:(.text+0x19f): undefined reference to `lzma_easy_encoder'
ZipLZMA.c:(.text+0x208): undefined reference to `lzma_code'
ZipLZMA.c:(.text+0x215): undefined reference to `lzma_end'
ZipLZMA.c:(.text+0x224): undefined reference to `lzma_end'
collect2: ld returned 1 exit status
make: *** [TestRoot] Error 1

Thanks