I don't see any "-L" reference on your link line for the
"libgrtl-1.0.so", just the fact you want to link to it, "-l".
It appears you're building on a unix platform.. does gretl supply a precompiled binary
that runs on a unix platform, as well... and if so, can it be invoked to read a text
file.. I note that in a Windows environment it has this type of run state, as defined in
the documentation.
-----Original Message-----
From: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-bounces@lists.wfu.edu] On
Behalf Of Ganguly, Sunandan
Sent: Thursday, April 30, 2009 3:25 PM
To: Gretl list
Subject: RE: [Gretl-users] Using the libgretl shared library in C++
Sorry, I forgot to mention my platform - Linux SLES10 64 bit AMD x86-64
Sunandan Ganguly
CREDIT SUISSE
Direct: (212) 325-0673
e-mail: sunandan.ganguly(a)credit-suisse.com
Please follow the attached hyperlink to an important disclosure:
http://www.credit-suisse.com/legal/marketcommentary
-----Original Message-----
From: gretl-users-bounces(a)lists.wfu.edu
[mailto:gretl-users-bounces@lists.wfu.edu] On Behalf Of Ganguly, Sunandan
Sent: Thursday, April 30, 2009 3:11 PM
To: Gretl list
Subject: [Gretl-users] Using the libgretl shared library in C++
Hi,
Has anyone out there ever tried to use the api-s within the shared library from inside a
C++ program? If yes, I'd like to hear about your experience with compiling and linking
your program. I have spent the last two days trying to build an app where I want to use
some basic regression, but I cant even get past the build stage.
I get this linker error :
/app/devtools/gcc-4.3.3/bin/g++ -m64 -mtune=opteron -lpthread Main.o
-L/app/devtools/gretl-1.8.0.org/lib -lgretl-1.0 -L/app/devtools/zlib-1.2.3/lib -lz
-L/app/devtools/libxml2-2.7.3/lib
-lxml2 -L/app/devtools/glib-2.14.6/lib -lglib-2.0
-L/app/devtools/refblas3-3.0-11/lib64/libblas.so.3.0.0
-L/app/devtools/liblapack3-3.2.0-5/lib64/liblapack.so.3
-L/app/devtools/fftw-3.2.1/lib -lfftw3
-L/app/devtools/gcc-4.3.3/lib64/libgfortran.so.1 -o Application.x
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgecon_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dsytri_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgetrs_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dorgqr_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dpocon_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dtrcon_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgeqrf_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgesvd_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dtrtri_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dsyev_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dsycon_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgels_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgelss_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dpptrf_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgemm_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgetri_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dpotrf_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dspsv_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dsyrk_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgetrf_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dpotrs_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dpotri_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dpptri_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dsytrf_'
/app/devtools/gretl-1.8.0.org/lib/libgretl-1.0.so: undefined reference to `dgeev_'
collect2: ld returned 1 exit status
make[1]: *** [Application.x] Error 1
make[1]: Leaving directory
`/app/home/sganguly/dev/atlas-HEAD-64/atlas/src/Application'
make: *** [All] Error 2
Note that the actual gretl shared lib was built succesfully. I get these errors in my app
from which I am trying to use the gretl lib.
Any insights/pointers anyone?
PS: I have a suggestion as well - I think its best to avoid using C++ keywords such as
"new" and "template" inside the C code for gretl as this also causes
trouble to folks that are trying to use the shared lib from C++.
Thanks in advance,
Sunandan Ganguly
========================================================================
=======
Please access the attached hyperlink for an important electronic communications
disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
========================================================================
=======
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
===============================================================================
Please access the attached hyperlink for an important electronic communications
disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===============================================================================
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users