> Hello all,
> I am _very_ new to GNUstep, but I just don`t get a simple Helloworldish
> example to work. I am talking about Nicola`s mini-Makefile tutorial,
> chapter 4: "A First App".
> I had no problem running "A First Tool". "A First App" however,
> compiled, but Segmentation Faulted. Each time. I updated the Debian
> Potato packages to those of Slink, but there was no change.
Hi and welcome.
I just tried installing the whole Debian packages - 0.6.6-0.1.
One thing - I was impressed by how easy it was to install the whole
gnustep stuff. I downloaded the .debs, installed them, and I was ready.
Debian rocks. :-)
But - I was quite puzzled by seeing that the stuff was compiled on 22 Jun
2000, while gnustep core 0.6.6 was released on 7 August 2000.
In my tests, it seems the core library which Debian is distributing as
0.6.6 is actually the core library somewhere in the frozen state before
the 0.6.6 release.
But the problem is - a couple of fundamental changes/bug fixes were made
in the last week of frozen state, so that I really encourage the Debian
maintainers to make an updated 0.6.6 gstep core packages using the CVS
version of 7 August 2000 (or better with the appropriate version tag).
It shouldn't be difficult, and it is really necessary.
One of these changes was made in the NSApplication code, which is now
so much cleaner and simple.
In 0.6.5, the backend was initialized with:
initialize_gnustep_backend ();
Now we use the OPENSTEP standard:
[NSApplication sharedApplication];
The makefile tutorial (and all the following tutorials) are updated to the
0.6.6 *release*. The Debian packages - while calling them 0.6.6 - are
actually pre-0.6.6 release - so they still require initializing the
backend in the old 0.6.5 way.
I tried the app, saw the segfault you report, tried replacing
[NSApplication sharedApplication];
with
initialize_gnustep_backend ();
and the thing compiled and worked fine: the segfault went away.
Please would you try doing it ?
I hope that will fix your problem.
--
After your report, I will add a section in the tutorial explaining that to
debug an application you need to use
debugapp myApp.debug
Thanks for pointing out that this was missing.