Please support our sponsors!
This service provided by BeBits: The Best Source of BeOS Software!
ProblemsBuildingSharedLibraries
I've built a few shared libraries on BeOS and run into some common problems. Here they are (with fixes):

Build complains about bad argument to gcc "-shared"

The BeOS gcc does not use the -shared flag. If you take this flag out you will (probably) get a complaint about lacking a main() function. Add the flag "-nostart" which removes the startup code. (including the call to main)

The application is using libtool, and it builds a static, but not a shared, library

You may see a warning about building shared libraries with undefined symbols being unsupported on BeOS. Most likely, your library has all the symbols defined. In this case, you should modify the Makefile, Makefile.in, etc. to add the flag "-no-undefined" to the variable libraryname_la_LDFLAGS. Here is an example:

libmp3lame_la_LDFLAGS = -no-undefined -version-info 0:0

After doing this you may have to delete the libraryname.la that is in the directory above ".libs". Doing this should cause libtool to rebuild the libraries, including the shared library.

configure refuses to accept that ld is from gnu, even after --with-gnu-ld

I came across this problem building libdvdcss 1.2.7. The configure script was generated by autoconf 2.57. It used a grep command somewhat like this: egrep '(GNU|with)' This type of grep command doesn't work in any grep before 2.5. You can download a current grep on bebits.

shatty!


PAGE VISITS
1,637

LINKS HERE
PortingToBeOS
IndexPage

NEW PAGES
BuildingCairo
StoringDataInBetweenOSes
ScriptingBeosRuby
ScriptingBeosPython
HaikuOS
QemUwinbe
MinimalBeos
XpMBRoverwrite
SteveSakoman
MailingLists

RECENT CHANGES
BuildingCairo
BeCommunity
BuildingFirebird
PlayGround
CorumIII
BeAcademic
SupportForMachinesAndArchitectures
BeOsReleases
HowTo
HaikuOS
Edit Page | Front Page | BeBits
Site content is in the public domain. Unless otherwise noted, everything else is copyright © 1999-2002 Fifth Ace Productions, LLC. All Rights Reserved.
For more legal trivia, take a gander at our
Legal Stuff page and our Privacy Statement.
Fifth Ace Productions