[haiku-3rdparty-dev] Re: Building Screensavers

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Tue, 03 Jul 2012 22:39:00 +0200

Rene Gollent wrote:
> On Tue, Jul 3, 2012 at 5:08 PM, Andrew Wood
> <andrew@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > It says to link against the screensaver prefs app but I cant get that to
> > work. Looking through the filesystem on Haiku I see there is a screensaver
> > library so Ive tried linking against that but Im still getting linker errors
> > about there being no main() function.
> 
> That's because add-ons and/or libraries aren't supposed to have one.
> However, you have to tell the compiler that you're building such a
> thing as opposed to a normal executable. This is done with -nostart on
> gcc2 and -shared on gcc4.

Just for sake of completeness: -shared works with gcc 2 as well and is 
therefore preferred.

CU, Ingo

Other related posts: