Thanks for the quick response.
After further analysis I have the following situation:
In my 'configure.ac' file I have:
PKG_CHECK_MODULES(DEPS, libwthttp-2.2.4 >= 0.0.1)
So this results in DEPS_CFLAGS and DEPS_LIBS being defined for the
makefile generarion - since
in my Automake based 'Makefile.am' file I have:
INCLUDES = $(DEPS_CFLAGS)
LDADD = $(DEPS_LIBS)
AM_LDFLAGS = -rdynamic -Wl -lgd -lm -ljpeg -lpng12
-lboost_regex-mt -lboost_signals-mt -lz -lssl -lcrypto \
-lboost_thread-mt -lboost_filesystem-mt
-lboost_program_options-mt -lboost_date_time-mt
The above line forces the libraries to be linked.
The example program links correctly but when I try to run it I get the
following error:
error while loading shared libraries: libwthttp.so.4: cannot open shared
object file: No such file or directory
But the libwthttp.so.4 file is installed in /usr/local/lib directory and
I have created a libwthttp-2.2.4.pc file and the DEPS_CFLAGS and
DEPS_LIBS seem to be defined correctly since the linking goes through.
Strangely if I export LD_LIBRARY_PATH=/usr/local/lib and run the same
binary it works without problems - in my analysis this is due to some
option being missed out/wrong during compilation and/or linking process
because the CMake based Makefile creates a binary which runs even when
the LD_LIBRARY_PATH is not exported.
> Date: Fri, 15 May 2009 11:45:26 +0200
> From: Pau Garcia i Quiles <[email protected]>
> Subject: Re: [Wt-interest] Exploring possible use of Witty - but need
> to get it to work with Automake based codebase
> To: [email protected]
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset=windows-1252
>
> On Fri, May 15, 2009 at 11:25 AM, Vivek Baindoor Rao
<[email protected]> wrote:
> > Hi Witty members,
> >
> > At the moment exploring and evaluating different packages to provide
a ?Web
> > interface? for existing product with uses a lot of code written in
C++ but
> > managed by Autoconf and Automake set of tools.
> >
> > Having installed the Witty 2.2.4 on a Fedora10 system I find it hard
to get
> > the examples provided with the Wt package work using Automake.? I
have
> > created the configure.ac and Makefile.am files but the linking
options used
> > for creating the executable are a bit of a mystery for me.
> >
> > Can someone tell me how to find the proper options that need to be
given for
> > proper linking of the examples.
>
> I am not sure I have understood what you want.
>
> It should be easy:
> - You always need to link to libwt
> - If the example source code has any #include <Wt/Char/Whatever>, you
> need to link to libwtchart, too
> - If the example source code has any #include <Wt/Ext/Whatever>, you
> need to link to libwtext, too
> - If you want to deploy using the embedded webserver, link to
> liblwthttp. If you want to deploy using FastCGI, link to libwtfcgi.
>
> Please note you need to run the examples from the directory where the
> resources are. If you are not running "make install" for the examples,
> that means you need to run the examples from the directory where the
> source files are, not from where the binaries are.
>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest