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

  • From: Andrew Wood <andrew@xxxxxxxxxxxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Thu, 05 Jul 2012 20:37:51 +0100

Thanks. Its making good progress.


On 03/07/12 21:39, Ingo Weinhold wrote:
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: