From: Aaron Spiteri on
Hi all,

I am having linking troubles using autotool. I am hoping someone out
there can spot what I am sure is a very simple error. Anyway I have
written some test cases and use the following in my Makfile.am file in
the "test" directory.

LDADD = $(top_builddir)/lib/libazzmos.la

test_azrmalloc_CFLAGS = -I$(top_srcdir)/include
test_azrmalloc_SOURCES = CuTest.c CuTest.h test_azrmalloc.c

test_azrlog_CFLAGS = -I$(top_srcdir)/include
test_azrlog_SOURCES = CuTest.c CuTest.h test_azrlog.c

test_azruriheader_CFLAGS = -I$(top_srcdir)/include
test_azruriheader_SOURCES = CuTest.c CuTest.h test_azruriheader.c

#test_azruristorage_LDFLAGS = -L$(top_builddir)/lib -lazzmos
test_azruristorage_CFLAGS = -I$(top_srcdir)/include
test_azruristorage_SOURCES = CuTest.c CuTest.h test_azruristorage.c


check_PROGRAMS = test_azrlog \
test_azrmalloc \
test_azruriheader \
test_azruristorage

TESTS = test_azrlog \
test_azrmalloc \
test_azruriheader \
test_azruristorage


When I try to run "test_azruristorage" I get a memory fault. Using GDB
I tracked the fault to be caused by the programming being unable to
load the libazzmos.la library dynamically. The troubling part is that
it works for all the other check programs and when I link it statically:

IE:

gcc -Lpath/to/lib -lazzmos [other libraries] [source files] -o
test_azruristorage

The test program compiles and behaves correctly. I know that this is a
linking problem but can not put my finger on it. Any help would be
appreciated.
--
.....
"When asked what he would like on his tomb stone he said more bass"

From: Jim Jackson on
Maybe I'm missing something here, but if you want to "dynamically load"
a library it should be an .so format dynamic library??

Aaron Spiteri <azzmosphere(at)gmail.com> wrote:
> Hi all,

> I am having linking troubles using autotool. I am hoping someone out
> there can spot what I am sure is a very simple error. Anyway I have
> written some test cases and use the following in my Makfile.am file in
> the "test" directory.

> LDADD = $(top_builddir)/lib/libazzmos.la

> test_azrmalloc_CFLAGS = -I$(top_srcdir)/include
> test_azrmalloc_SOURCES = CuTest.c CuTest.h test_azrmalloc.c

> test_azrlog_CFLAGS = -I$(top_srcdir)/include
> test_azrlog_SOURCES = CuTest.c CuTest.h test_azrlog.c

> test_azruriheader_CFLAGS = -I$(top_srcdir)/include
> test_azruriheader_SOURCES = CuTest.c CuTest.h test_azruriheader.c

> #test_azruristorage_LDFLAGS = -L$(top_builddir)/lib -lazzmos
> test_azruristorage_CFLAGS = -I$(top_srcdir)/include
> test_azruristorage_SOURCES = CuTest.c CuTest.h test_azruristorage.c


> check_PROGRAMS = test_azrlog \
> test_azrmalloc \
> test_azruriheader \
> test_azruristorage

> TESTS = test_azrlog \
> test_azrmalloc \
> test_azruriheader \
> test_azruristorage


> When I try to run "test_azruristorage" I get a memory fault. Using GDB
> I tracked the fault to be caused by the programming being unable to
> load the libazzmos.la library dynamically. The troubling part is that
> it works for all the other check programs and when I link it statically:

> IE:

> gcc -Lpath/to/lib -lazzmos [other libraries] [source files] -o
> test_azruristorage

> The test program compiles and behaves correctly. I know that this is a
> linking problem but can not put my finger on it. Any help would be
> appreciated.
> --
> ....
> "When asked what he would like on his tomb stone he said more bass"