[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] missing info in the models tarballs.

From: David Fang
Subject: Re: [Gnucap-devel] missing info in the models tarballs.
Date: Sat, 24 Feb 2007 03:43:57 -0500 (EST)

> /usr/include/stdlib.h:226: error: declaration of C function 'int
> setenv(const char*, const char*, int)' conflicts with
> ../Include/cpstd.h:54: error: previous declaration 'void setenv()' here
> ../Include/ In static member function 'static void
> MODEL_SPICE::init_ckt()':
> ../Include/ warning: the address of 'static CKTcircuit*
> MODEL_SPICE::ckt()', will always evaluate as 'true'
> make[1]: *** [wrapper.o] Error 1
> And in cpstd.h:
> #ifndef linux
> extern void setenv();
> #endif /* linux */

After I commented out the above, the link command is incorrect:

g++ wrapper.o asrc.o asrcacld.o asrcask.o asrcconv.o asrcdel.o asrcdest.o
asrcfbr.o asrcload.o asrcmdel.o asrcpar.o asrcpzld.o asrcset.o  devsup.o
-shared -o
powerpc-apple-darwin8-g++-4.0.1: unrecognized option '-shared'

Then it complains about missing symbols, because it didn't figure out that
it's supposed to build a shared library, right? I strongly recommend
GNU libtool -- it works like magic; I don't even know what magic flags and
incantations are needed on various platforms I use. Static and shared
libraries just work.  (BTW, .dylib is the proper extension on darwin, but
autoconf/libtool take care of it for you.)
# will install libasrc.{so,dylib,a} in /prefix/lib/gnucap, for example.

# one possibiliy: flags reference the installed gnucap base
# alternative: make gnucap core sources a build-time dependence
libasrc_la_SOURCES = ...
libasrc_la_LIBADD = @GNUCAP_LIBS@
# values determined by configure, user-customizable, probably don't need
# to separate library and  path arguments.

and that's it.

One thing that might make life easier is pkg-config, which keeps the
necessary package information (paths, compile flags, link flags) of a
configured install in a handy configuration file.  Then plug-in modules
can just reference the config file (can be script too) during their
configuration process.

David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
        -- (2400 baud? Netscape 3.0?? lynx??? No problem!)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]