Mingw-w64-pdcurses static libraries

Hello!
I noticed during the course of my programming that the mingw-w64-pdcurses package only builds and installs shared versions of the library, not static versions. Since the wiki guidelines (https://wiki.archlinux.org/index.php/Mi … Guidelines) prescribe the compilation of both static and shared versions, I thought I'd fix that.
First, though, I wanted to post my midifications to the PKGBUILD here for review. I'm still fairly new to Arch and its community, and I wanted to be sure I wasn't violating any guidelines. Also, how should I go about submitting these changes to the AUR? Should I just go ahead and upload the new tarball? Should I contact the package maintainer and let him/her upload the new tarball? Or is there a good reason the static libraries weren't built in the first place; in which case, would it be best to upload it as a new mingw-w64-pdcurses-static package?
Here are my proposed modifications:
PKGBUILD
# Contributor: Filip Brcic <[email protected]>
# Contributor: TheGuy <[email protected]>
pkgname=mingw-w64-pdcurses
pkgver=3.4
pkgrel=3
pkgdesc="Curses library for MinGW (mingw-w64)"
arch=('any')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-gcc')
options=('staticlibs' '!buildflags' '!strip')
license=('custom')
url="http://pdcurses.sourceforge.net/"
source=("http://downloads.sourceforge.net/pdcurses/PDCurses-${pkgver}.tar.gz"
"mingw-pdcurses-3.4-build.patch")
md5sums=('4e04e4412d1b1392a7f9a489b95b331a'
'3ab3282497fd815b18a17d4f43eb9fb6')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "${srcdir}/PDCurses-${pkgver}"
patch -Np1 -i ${srcdir}/mingw-pdcurses-3.4-build.patch
sed -i "s|CFLAGS = \-O2 \-Wall|CFLAGS = \-O2 \-g -pipe \-Wall \-Wp,\-D_FORTIFY_SOURCE=2 \-fexceptions \-\-param=ssp\-buffer\-size=4|g" win32/mingwin32.mak
build() {
cd "${srcdir}/PDCurses-${pkgver}"
export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
for _arch in ${_architectures}; do
cp -a win32 build-${_arch} && pushd build-${_arch}
make -f mingwin32.mak \
CC=${_arch}-gcc \
AR=${_arch}-ar \
LINK=${_arch}-gcc \
STRIP=${_arch}-strip \
WIDE=Y UTF8=Y DLL=Y
make -f mingwin32.mak \
CC=${_arch}-gcc \
AR=${_arch}-ar \
LINK=${_arch}-gcc \
STRIP=${_arch}-strip \
WIDE=Y UTF8=Y DLL=N \
libs
popd
done
package() {
cd "${srcdir}/PDCurses-${pkgver}"
for _arch in ${_architectures} ; do
install -d "${pkgdir}"/usr/${_arch}/{bin,lib,include}
install build-${_arch}/pdcurses.dll "${pkgdir}"/usr/${_arch}/bin/
install build-${_arch}/pdcurses.dll.a "${pkgdir}"/usr/${_arch}/lib/libpdcurses.dll.a
install build-${_arch}/pdcurses.a "${pkgdir}"/usr/${_arch}/lib/libpdcurses.a
install -m 0644 curses.h panel.h term.h "${pkgdir}"/usr/${_arch}/include/
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
done
mingw-pdcurses-3.4-build.patch
diff -Naur PDCurses-3.4.orig/win32/mingwin32.mak PDCurses-3.4/win32/mingwin32.mak
--- PDCurses-3.4.orig/win32/mingwin32.mak 2008-07-21 08:31:36.000000000 -0400
+++ PDCurses-3.4/win32/mingwin32.mak 2015-01-15 23:07:24.339995873 -0500
@@ -19,6 +19,8 @@
PDCURSES_WIN_H = $(osdir)/pdcwin.h
CC = gcc
+AR = ar
+STRIP = strip
ifeq ($(DEBUG),Y)
CFLAGS = -g -Wall -DPDCDEBUG
@@ -30,8 +32,8 @@
CFLAGS += -I$(PDCURSES_SRCDIR)
-BASEDEF = $(PDCURSES_SRCDIR)\exp-base.def
-WIDEDEF = $(PDCURSES_SRCDIR)\exp-wide.def
+BASEDEF = $(PDCURSES_SRCDIR)/exp-base.def
+WIDEDEF = $(PDCURSES_SRCDIR)/exp-wide.def
DEFDEPS = $(BASEDEF)
@@ -50,14 +52,14 @@
ifeq ($(DLL),Y)
CFLAGS += -DPDC_DLL_BUILD
- LIBEXE = gcc $(DEFFILE)
- LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o
+ LIBEXE = $(CC) $(DEFFILE)
+ LIBFLAGS = -Wl,--out-implib,pdcurses.dll.a -shared -o
LIBCURSES = pdcurses.dll
LIBDEPS = $(LIBOBJS) $(PDCOBJS) $(DEFFILE)
CLEAN = $(LIBCURSES) *.a $(DEFFILE)
else
- LIBEXE = ar
- LIBFLAGS = rcv
+ LIBEXE = $(AR)
+ LIBFLAGS = rcvs
LIBCURSES = pdcurses.a
LIBDEPS = $(LIBOBJS) $(PDCOBJS)
CLEAN = *.a
@@ -70,24 +72,24 @@
libs: $(LIBCURSES)
clean:
- -del *.o
- -del *.exe
- -del $(CLEAN)
+ -rm *.o
+ -rm *.exe
+ -rm $(CLEAN)
demos: $(DEMOS)
- strip *.exe
+ $(STRIP) *.exe
$(DEFFILE): $(DEFDEPS)
echo LIBRARY pdcurses > $@
echo EXPORTS >> $@
- type $(BASEDEF) >> $@
+ cat $(BASEDEF) >> $@
ifeq ($(WIDE),Y)
- type $(WIDEDEF) >> $@
+ cat $(WIDEDEF) >> $@
endif
$(LIBCURSES) : $(LIBDEPS)
$(LIBEXE) $(LIBFLAGS) $@ $?
- -copy pdcurses.a panel.a
+ -cp pdcurses.dll.a panel.a
$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_WIN_H)

As noted in the wiki page I linked earlier, the mingw-w64 packages are treated uniquely in that they should "always build both shared and static binaries, unless they conflict". Indeed, this convention is followed in similar packages, like mingw-w64-readline, which depends on mingw-w64-pdcurses. Surely this package should also endeavour to supply static libs, so that software linking against static libs provided by its dependencies can be (fully) statically cross-compiled?
Last edited by TheGuy (2015-01-16 08:52:36)

Similar Messages

  • How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

    Hi,
    I had the ambitious plan of creating PKGBUILDs to provide a fully functional and full-featured MinGW-w64 toolchain in Arch (starting with the AUR). For those of you not aware of MinGW-w64; it's a project that provides the more complete alternative for MinGW.org: they support a much larger set of the Win32 API and provide 64-bit support. In short: they allow you to use GCC for Windows 32 and 64-bit.
    The current list of packages is here: https://aur.archlinux.org/packages.php?SeB=m&K=rubenvb
    They work (roughly, for me, I'm working out the problems as people report them), but only if you build and install them manually.
    I would like to ask the help of the experts that reside here to resolve the issue that handy tools like yaourt and other AUR utilities cannot build/install these packages automagically, so that people are more easily persuaded to use my packages. The dependencies here are what functionally needs to be set, not per se what the current PKGBUILDs specify, due to numerous experiments and trial and error...)
    The build and install order needs to be strictly followed:
    1. build+install mingw-w64-headers-base (no makedepends)
    2. build+install mingw-w64-binutils (no makedepends)
    3. build+install mingw-w64-gcc-base (makedepends and depends: mingw-w64-binutils)
    4. build+install mingw-w64-crt (makedepends and depends: mingw-w64-gcc-base and mingw-w64-binutils)
    5. build mingw-w64-winpthreads (makedepends: mingw-w64-headers-base, mingw-w64-gcc-base and mingw-w64-binutils, conflicts mingw-w64-headers-base)
    6. build mingw-w64-headers (no makedepends, conflicts mingw-w64-headers-base)
    7. install mingw-w64-headers (replaces mingw-w64-headers-base)
    8. install mingw-w64-winpthreads
    9. build+install mingw-w64-gcc (replaces mingw-w64-gcc-base)
    I tried to enforce this as much as possible in the PLGBUILDs, but am unsure if everything is as it should be...
    The resulting binary packages that non-AUR-users
    (once mingw-w64 is in a binary repo) should install:
    - mingw-w64-headers
    - mingw-w64-crt
    - mingw-w64-winpthreads
    - mingw-w64-binutils
    - mingw-w64-gcc
    The issue is that winpthreads overwrites two dummy headers that have to be included in mingw-w64-headers-base, so I provide a mingw-w64-headers package omitting these two files, but unusable without mingw-w64-winpthreads. So winpthreads needs to be built when mingw-w64-headers-base is installed, and mingw-w64-headers cannot be installed before winpthreads is installed, due to these two headers (per architecture) being supplied by winpthreads in a complete form.
    I will try to tune the dependencies tonight, but any help or insight into the automation process is highly appreciated!
    Thanks,
    Ruben
    Last edited by rubenvb (2011-11-22 21:28:12)

    Interesting problem.
    While i don't use any aur helper, i think you can simplify your approach a bit.
    Here's how i would do it (changes in red) :
    1. build+install mingw-w64-headers-base (no makedepends)
    this package DOES NOT include the dummy headers
    1a. build + install mingw-w64-headers-extra-dummy (makedepends : mingw-w64-headers-base)
    this package will include ONLY the dummy headers
    2. build+install mingw-w64-binutils (no makedepends)
    3. build+install mingw-w64-gcc-base (makedepends and depends: mingw-w64-binutils)
    4. build+install mingw-w64-crt (makedepends and depends: mingw-w64-gcc-base and mingw-w64-binutils)
    5. build mingw-w64-winpthreads
    makedepends:
    mingw-w64-headers-base, mingw-w64-gcc-base and mingw-w64-binutils, mingw-w64-headers-extra-dummy
    conflicts with mingw-w64-headers-extra-dummy
    provides mingw-w64-headers-extra
    6. skipped
    7. skipped
    8. install mingw-w64-winpthreads
    9. build+install mingw-w64-gcc (replaces mingw-w64-gcc-base)
    makedepends : mingw-w64-headers-base, mingw-w64-headers-extra

  • Static libraries in Solaris10

    Hi,
    Static libraries like libm.a are not there in Solaris10.? I am getting following error while linking.
    <Snapshot>
    ld: fatal: file[b] /usr/lib/libm.a: open failed: No such file or directory
    If it is not there, what is the solution.? Should I use only dynamic libraries...?
    Thanks in Advance,
    Karthikeyan

    There are no more static libraries shipped with Solaris 10.
    You should use only dynamic libraries when compiling under Solaris 10

  • Rfc static libraries for Unicode (Linux)

    Hi all!
    Does anybody know if it is possible to use RFC static libraries for Unicode on Linux?
    I can compile and link my application, but when I am running it, I get message:  "undefined symbol: strtolU16". librfcu.a  is the only static library, which is provided in RFCSDK. Do I need to link my application with any other library?
    Everything works fine with non-unicode static library.
    Thank you in advance,
    Elena

    Oracle does not provide any static libraries for MS Windows.

  • Unusable static libraries in $TUXDIR/lib

    Hi,
    I'm trying to build a WS client to run on TRU64, and I would like to use the static
    libraries to make delivery easier. I have tried using buildclient and the cxx
    compiler/linker directly however the following is the best result I can get either
    way
    ld:
    Skipping archive /users/mlee/bea/tuxedo8.1/lib/libwsc.a because it has no archive
    header
    So then, when I check the library I get...
    4 -r-xr-xr-x 1 mlee pcs 8 Aug 13 2003 libwsc.a*
    8 bytes seems a bit useless! There are various posts on the web about this error
    but all solutions relate to rebuilding from source, not really an option for tuxedo?
    So I suppose I'm asking; Is there an installation option that will resolve this?

    Tuxedo does not ship with static libraries. The .a files that you see
    are not static libraries.
    Max Lee wrote:
    Hi,
    I'm trying to build a WS client to run on TRU64, and I would like to use the static
    libraries to make delivery easier. I have tried using buildclient and the cxx
    compiler/linker directly however the following is the best result I can get either
    way
    ld:
    Skipping archive /users/mlee/bea/tuxedo8.1/lib/libwsc.a because it has no archive
    header
    So then, when I check the library I get...
    4 -r-xr-xr-x 1 mlee pcs 8 Aug 13 2003 libwsc.a*
    8 bytes seems a bit useless! There are various posts on the web about this error
    but all solutions relate to rebuilding from source, not really an option for tuxedo?
    So I suppose I'm asking; Is there an installation option that will resolve this?

  • Extending DPS reader with static libraries and frameworks

    Is there any initiative within Adobe's roadmap to enable extending DPS reader within Xcode by use of static libraries and frameworks?
    Core functionality of the reader could be linked and distributed as binary assembly via static libraries.
    Shared resources of the DPS reader could be packaged wtihin a framework.
    Beyond extending capabilities of the reader, this would also enable advanced debugging and running on devices directly from Xcode.
    References:
    Using Static Libraries in iOS
    Framework Programming Guide
    iOS Frameworks

    Now that the .folio format has been opened up, are there any updates with regards to providing developers access to reader frameworks/libraries?
    Adobe .folio Format Specification
    In addition to the new feature updates, the technical specification for the .folio format is now available under a free license; further accelerating digital publication adoption and enabling newsstands to produce their own viewing apps capable of displaying digital content built using DPS. All entities who sign the license agreement will be given access to the specification.

  • Multilib mingw-w64

    Why are all mingw-w64-* packages using two different targets as opposed to just being multilib? I am well aware of TDM GCC, which is a multilib gcc distribution for Windows. Their patches could be perhaps used here? I have tried creating multilib PKGBUILDs, and I have created them for binutils, headers, headers-bootstrap, gcc-base and crt, but I'm stuck on winpthreads. I'm not very familiar with autotools, and I can't really dig too deep into its makefiles and config scripts. If there's an interest, I could post the PKGBUILDs and the specifics of the errors I'm stuck on. Is a multilib feasible, or even possible without major patches?

    fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o fortran/class.o fortran/constructor.o fortran/cpp.o fortran/data.o fortran/decl.o fortran/dump-parse-tree.o fortran/error.o fortran/expr.o fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.o fortran/match.o fortran/matchexp.o fortran/misc.o fortran/module.o fortran/openmp.o fortran/options.o fortran/parse.o fortran/primary.o fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o fortran/symbol.o fortran/target-memory.o fortran/convert.o fortran/dependency.o fortran/f95-lang.o fortran/trans.o fortran/trans-array.o fortran/trans-common.o fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o fortran/trans-stmt.o fortran/trans-types.o fortran/frontend-passes.o main.o libbackend.a libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a attribs.o -lcloog-isl -lisl -lppl_c -lppl -lgmpxx -lmpc -lmpfr -lgmp -rdynamic -ldl -lz
    collect2: error: ld returned 1 exit status
    make[2]: *** [f951] Error 1
    make[2]: Leaving directory `/tmp/yaourt-tmp-schala/aur-mingw-w64-gcc/src/gcc-build-x86_64-w64-mingw32/gcc'
    make[1]: *** [all-gcc] Error 2
    make[1]: Leaving directory `/tmp/yaourt-tmp-schala/aur-mingw-w64-gcc/src/gcc-build-x86_64-w64-mingw32'
    make: *** [all] Error 2

  • VS2013.3 - Static libraries with RTTI linked to app without RTTI leads to crash

    I got a crash today that I traced back to an RTTI mismatch between wxWidgets static libraries and the application. The static libraries had RTTI enabled and the application did not. The crash occurred in wxWidgets when retrieval of type information in wxWidgets
    was attempted. It was reproducible in VS2003 SP1, VS2010 SP1 and VS2013.3. You can read more about it here:
    wxTypeId() without RTTI crashes in Visual Studio
    Unhandled exception at 0x00000000 in app.exe: 0xC0000005: Access violation reading location 0x00000000.
    When I enabled RTTI in the application that solved the issue. I also tested disabling RTTI in both the static libraries and application and that solved the issue as well. So it seems there is no mixing of RTTI settings for apps linking to wxWidgets but whether
    that's applicable apart from wxWidgets I don't know. I can't find it documented for Visual Studio.
    I am thinking about filing this as a bug, if only to ask for future updates of Visual Studio to warn or error if there is an RTTI mismatch. Before I do though I'd like any input you guys have. Do you consider this a bug? Have you ever encountered anything
    like this before?
    Thanks

    Hi Popchoc,
    Thanks for posting in VS general question forum. But your issue is out of support range of VS General Question forum which mainly discusses the usage of Visual Studio IDE such as WPF & SL designer, Visual
    Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Based on your description, it seems that Visual Studio does not allow mix of RTTI settings. I am not sure whether it is only limited to wxWidgets which is third-party. I am not a developer, it is hard for me
    to repro a similar scenario for this behavior. Since RTTI is related to Visual C++, I think you can open a new thread on Visual C++ forum to check whether Visual C++ allows mixed RTTI settings in projects.
    As for the compatibility issue between RTTI and wxWidgets,
    you could submit this feedback to Microsoft Connect feedback portal:
    http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,
    Microsoft product team will evaluate them seriously. After you submit the feedback, you can post the link here which will be beneficial for other members with the similar issue. And I will help you to vote it.
    Thanks for your understanding.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • MinGW-w64 packaging guidelines

    I am the submitter/maintainer of the AUR MinGW-w64 toolchain packages, and have noticed that people have begun to step up and create library packages for the cross-compilers. Awesome!
    I would however like to set up some basic PKGBUILD guidelines to ensure the quality and usability of packages depending on the MinGW-w64 toolchain.
    Can I just append a "MinGW-w64 PKGBUILD guidelines" section on https://wiki.archlinux.org/index.php/Ar … guidelines ?
    It would mostly be analogous to the MinGW page with a few important differences.
    I feel this would promote the adoption of the MinGW-w64 toolchain to supersede the MinGW.org toolchain (which cannot produce Windows x64 binaries) currently in use in [Community].
    Thanks!

    rubenvb wrote:
    the.ridikulus.rat wrote:Oh. Ok. Thats fine. Is that the same case with your(?) builds (-bin) in sourceforge? In that case I will directly use the -bin package. Its been a long time since I stopped using that. Right now I use http://tdm-gcc.tdragon.net/ in Windows (not too much).
    My builds (not the AUR package of which the link won't work anymore as I've changed around the directory layout on SF) are single architecture. You'll need to download two files to get everything. There's a "mingw32" and a "mingw64".
    Thats exactly what I don't want to do. Downloading two files leads to lots of bandwidth wastage, instead of a single download containing multilib enabled mingw-w64 gcc binary (which supports -m32 and -m64).
    I wouldn't recommend TDM, because he uses non-standard patches which make everything incompatible with upstream GCC.
    Which pre-compiled mingw-w64 (with multilib) download would you recommend for Windows 7 x64 host? (MODs: I don't know whether this is considered off-topic discussion. If so, sorry, but please inform me.)
    Last edited by the.ridikulus.rat (2012-05-04 10:37:40)

  • Mingw-w64-gcc: Broken, or just me?

    When attempting to install mingw-w64-gcc, compilation tends to fail during gfortran's compilation stage. The log gives no error other than ld's exit status and that collect2 reports it. Is this just me or have others got a similar issue? It's been about two weeks or more I think and I have not got a response.

    fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o fortran/class.o fortran/constructor.o fortran/cpp.o fortran/data.o fortran/decl.o fortran/dump-parse-tree.o fortran/error.o fortran/expr.o fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.o fortran/match.o fortran/matchexp.o fortran/misc.o fortran/module.o fortran/openmp.o fortran/options.o fortran/parse.o fortran/primary.o fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o fortran/symbol.o fortran/target-memory.o fortran/convert.o fortran/dependency.o fortran/f95-lang.o fortran/trans.o fortran/trans-array.o fortran/trans-common.o fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o fortran/trans-stmt.o fortran/trans-types.o fortran/frontend-passes.o main.o libbackend.a libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a attribs.o -lcloog-isl -lisl -lppl_c -lppl -lgmpxx -lmpc -lmpfr -lgmp -rdynamic -ldl -lz
    collect2: error: ld returned 1 exit status
    make[2]: *** [f951] Error 1
    make[2]: Leaving directory `/tmp/yaourt-tmp-schala/aur-mingw-w64-gcc/src/gcc-build-x86_64-w64-mingw32/gcc'
    make[1]: *** [all-gcc] Error 2
    make[1]: Leaving directory `/tmp/yaourt-tmp-schala/aur-mingw-w64-gcc/src/gcc-build-x86_64-w64-mingw32'
    make: *** [all] Error 2

  • Static Libraries in C executables.....

    Hi, are there any symbol in the symbol table of C executable, that tells me the name of statically linked libraries and API's. or are there any method to determine the name of the statically linked library from a executable.

    There are no more static libraries shipped with Solaris 10.
    You should use only dynamic libraries when compiling under Solaris 10

  • Static libraries undefined symbols

    Hello,
    I have three libraries A,B,C. C uses B and A. B uses A. A is a dynamic library. I complied B and C as static libraries but when I try to use C I get a lot of undefined symbols related to B.
    Is there a special flag that I can use with libtool and get rid of that messages?

    What does your link order look like? Make sure B comes last.

  • [SOLVED] mingw32 cross compile won't link with static libraries

    Hi all,
    I'm trying to cross compile an app I have written to i486-mingw32.  I'm running Arch 64-bit (under which it compiles fine natively), and I have installed the mingw32 binaries along with mingw32-boost-static from AUR.
    All seems well, but unfortunately when I cross compile my code libtool refuses to link to the static Boost libraries:
    *** Warning: Trying to link with static lib archive /usr/i486-mingw32/lib/libboost_filesystem-mt-s.a.
    *** I have the capability to make that library automatically link in when
    *** you link to this library. But I can only do this if you have a
    *** shared version of the library, which you do not appear to have
    *** because the file extensions .a of this argument makes me believe
    *** that it is just a static archive that I should not use here.
    This then leads to undefined references as the library is not linked in.  But as I *want* the static version of the library, does anyone know how to tell libtool to accept the .a file and link it?
    Last edited by Malvineous (2011-05-02 02:44:48)

    Just to follow up on this, I discovered the problem.  It turns out libtool was doing the correct thing, and refusing to link the static library in with the shared one (otherwise later this could result in something being defined multiple times.)  The undefined references were unrelated to the error above, and the code that was causing them (in a different Boost header file) could be easily #defined out.
    When the time came to link the actual executables, libtool did include all the necessary libraries and everything worked as it should!

  • Static Libraries

    I am trying to compile a jsoncpp into a static libraray (libjson.a) using the ar command.
    I am using "ar rvs libjson.a json.o" after compiling the library into json.o.
    I then try to compile another libary and include a static reference to the libjson.a file (using -ljson) and I receive the following error:
    error: json: no archive symbol table (run ranlib)
    Before I spend too much time tracking this down, I was wondering if I was on the right path here.  Is static linking allowed with flascc?  Should I be using SWC files instead for compiling libraries?  Should I simplify matters by simply compiling the json libary into my project by just including the cpp files?
    Thank you!
    Robert

    You're definitely on the right path. Flascc allows *only* static linking, so the approach is correct.
    I've had exactly the same error message before, but I can't remember the cause Probably ar parameters? I use "ar rcs" in my scripts.

  • Using buildclient to build static libraries under Windows

    Hi All,
    I have been trying to use buildclient to build a static library
    but in vain. When i run the following command on the command line
    "buildclient -w -v -o GenSvcWrapper.lib -f GenSvcWrapper.cpp" ,
    i get the error (LINK : fatal error LNK1561: entry point must be
    defined), which i guess is asking for a main() in the program.
    I tried using the VC++ IDE to build the library, now i am able
    to build the library but the call to tpinit() fails.
    My conclusion is that buildclient can be used only to build
    exe's. Am i wrong in my conclusion? If not how do I build
    libraries using buildclient or VC++ IDE? What i want is to wrap
    Tuxedo ATMI calls like (tpinit() and tpcall()) and provide it as
    a library.
    Please help me out in this problem. I have pasted the build
    output below.
    Thanks,
    Santhosh
    Build Output <<<<<<<<<<<<<<<<<<<<<<<<<<<<<E:\Code\VC\GenSvcWrapper>buildclient -w -v -o GenSvcWrapper.lib -f
    GenSvcWrapper
    .cpp
    cl /MD -I"%TUXDIR%"\include -FeGenSvcWrapper.lib GenSvcWrapper.cpp
    "%TUXDIR%
    "\lib\libwsc.lib "%TUXDIR%"\lib\libbuft.lib "%TUXDIR%"\lib\libfml.lib
    "%TUXDIR
    %"\lib\libfml32.lib "%TUXDIR%"\lib\libengine.lib wsock32.lib kernel32.lib
    advap
    i32.lib user32.lib gdi32.lib comdlg32.lib
    winspool.lib -link -implib:BC-7b0.li
    b
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
    Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
    GenSvcWrapper.cpp
    Will automatically link with libbuft.lib
    Will automatically link with libwsc.lib
    Will automatically link with libengine.lib
    Will automatically link with libfml.lib
    Will automatically link with libfml32.lib
    Microsoft (R) Incremental Linker Version 6.00.8447
    Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
    /out:GenSvcWrapper.lib
    -implib:BC-7b0.lib
    GenSvcWrapper.obj
    "E:\Program Files\bea\tuxedo8.0\lib\libwsc.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libbuft.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libfml.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libfml32.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libengine.lib"
    wsock32.lib
    kernel32.lib
    advapi32.lib
    user32.lib
    gdi32.lib
    comdlg32.lib
    winspool.lib
    LINK : fatal error LNK1561: entry point must be defined
    TUXNT_CAT:77: ERROR: Can't execute cl
    /MD -I"%TUXDIR%"\include -FeGenSvcWrapper
    .lib GenSvcWrapper.cpp "%TUXDIR%"\lib\libwsc.lib
    "%TUXDIR%"\lib\libbuft.lib
    "%TUXDIR%"\lib\libfml.lib "%TUXDIR%"\lib\libfml32.lib
    "%TUXDIR%"\lib\libengine.
    lib wsock32.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib
    win
    spool.lib -link -implib:BC-7b0.lib

    You can build libraries using buildclient by working out the VC++ command line
    argument used to build a static library and passing that in the -f option of buildclient.
    There's no real point in using buildclient to build a tuxedo client because the
    only thing it does for you is specify the tuxedo libraries that get linked into
    the exe or lib that you are creating, and complain if you don't have a valid SDK
    license. I just specify the tuxedo libraries myself to VC++ and completely forget
    about using buildclient. The only thing to keep in mind is to make sure you are
    using the correct tuxedo libraries for a native or workstation tuxedo client (pretty
    much libtux.lib for native and libwsc.lib for a workstation client followed by
    the other tuxedo libraries you need, libbuft.lib libfml.lib libfml32.lib libengine.lib
    etc. ).
    "Santhosh" <[email protected]> wrote:
    >
    Hi All,
    I have been trying to use buildclient to build a static library
    but in vain. When i run the following command on the command line
    "buildclient -w -v -o GenSvcWrapper.lib -f GenSvcWrapper.cpp" ,
    i get the error (LINK : fatal error LNK1561: entry point must be
    defined), which i guess is asking for a main() in the program.
    I tried using the VC++ IDE to build the library, now i am able
    to build the library but the call to tpinit() fails.
    My conclusion is that buildclient can be used only to build
    exe's. Am i wrong in my conclusion? If not how do I build
    libraries using buildclient or VC++ IDE? What i want is to wrap
    Tuxedo ATMI calls like (tpinit() and tpcall()) and provide it as
    a library.
    Please help me out in this problem. I have pasted the build
    output below.
    Thanks,
    Santhosh
    Build Output <<<<<<<<<<<<<<<<<<<<<<<<<<<<<E:\Code\VC\GenSvcWrapper>buildclient -w -v -o GenSvcWrapper.lib -f
    GenSvcWrapper
    .cpp
    cl /MD -I"%TUXDIR%"\include -FeGenSvcWrapper.lib GenSvcWrapper.cpp
    "%TUXDIR%
    "\lib\libwsc.lib "%TUXDIR%"\lib\libbuft.lib "%TUXDIR%"\lib\libfml.lib
    "%TUXDIR
    %"\lib\libfml32.lib "%TUXDIR%"\lib\libengine.lib wsock32.lib kernel32.lib
    advap
    i32.lib user32.lib gdi32.lib comdlg32.lib
    winspool.lib -link -implib:BC-7b0.li
    b
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for
    80x86
    Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
    GenSvcWrapper.cpp
    Will automatically link with libbuft.lib
    Will automatically link with libwsc.lib
    Will automatically link with libengine.lib
    Will automatically link with libfml.lib
    Will automatically link with libfml32.lib
    Microsoft (R) Incremental Linker Version 6.00.8447
    Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
    /out:GenSvcWrapper.lib
    -implib:BC-7b0.lib
    GenSvcWrapper.obj
    "E:\Program Files\bea\tuxedo8.0\lib\libwsc.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libbuft.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libfml.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libfml32.lib"
    "E:\Program Files\bea\tuxedo8.0\lib\libengine.lib"
    wsock32.lib
    kernel32.lib
    advapi32.lib
    user32.lib
    gdi32.lib
    comdlg32.lib
    winspool.lib
    LINK : fatal error LNK1561: entry point must be defined
    TUXNT_CAT:77: ERROR: Can't execute cl
    /MD -I"%TUXDIR%"\include -FeGenSvcWrapper
    .lib GenSvcWrapper.cpp "%TUXDIR%"\lib\libwsc.lib
    "%TUXDIR%"\lib\libbuft.lib
    "%TUXDIR%"\lib\libfml.lib "%TUXDIR%"\lib\libfml32.lib
    "%TUXDIR%"\lib\libengine.
    lib wsock32.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib
    win
    spool.lib -link -implib:BC-7b0.lib

Maybe you are looking for

  • Is there a way to add files to a package without repackaging in a new folder?

    So I'm working on this promotional binder for a company. I'm working section by section including photos and whatnot. Anyways, I got to a certain point with one section and packaged everything so I could start anew the following day. My question is t

  • How to delete album in photo apps?

    A friend loaded 291 pics into Photo apps of my iPad from his mac. I am using Windows Vista, I would like to delete for ever all those pics. How to do it? Than k you.

  • Artists not appearing on my ipod

    Any idea why parts of my library can only be found on my ipod classic 80gb by song title and album, but not by artist? The song information correctly displays on my itunes library on my computer, but when it syncs to the ipod sometimes the artist won

  • Satellite Pro L - Mobile phone asks for driver

    I am trying to connect my new Samsung Galaxy S Android mobile phone to my Toshiba Satellite, however the laptop will not recognise the phone and asks for a driver. Can anyone help?

  • Translation Builder with Apps

    Hi, We have some custom forms in Oracle apps (11.5.10.2) and would like to extend it to more than 1 language. How do we translate the forms(boilerplates, button, labels etc.)? I was going through Oracle Translation builder and think that this would h