Re: Bus Error
Re: Bus Error
- Subject: Re: Bus Error
- From: Federico <email@hidden>
- Date: Wed, 15 Jun 2005 16:53:26 +0200
Thanks a lot: I'm using GCC 3.3.
I use the debugger with Guard Malloc enabled. And it crashes whenever I write
printf("%s\n", argv[0]);
I think I do not to have to control if it exists: it's the app name!
And it generates bus error at all.
I think it could be a linker problem. I must link with g++ cause I
have to use certein libs which need it.
I wrote another bit app and I have no problem in mom allocation or
command line parameters.
I just do not understand. What do you exactly mean with "to fix your app"?
Thanks for your help
--
Federico
2005/6/15, Markus Hitter <email@hidden>:
>
> Am 15.06.2005 um 08:46 schrieb Federico:
>
>
> > Hi, I'm developing an application for my thesis, beginning now my
> > XCode experience.
> > I'm using Mac OS X 10.3.7 with XCode 1.5.
> > I compile my GNU Make application
> >
>
> So, you're using a traditional Makefile? What happens if you compile
> and run your code in Terminal? Which compiler do you use on both
> systems ("man gcc_select") ?
>
>
> > -- I created it using the AutoTools with Suse Linux --
> >
>
> Should be fine as long as you add enough tests and code support
> (#ifdef's) to honor all relevant differences between SuSE Linux and
> Mac OS X.
>
>
> > and when I run it the first error is a BUS ERROR.
> >
>
> gdb, the debugger is your friend. From within Xcode, it's launched if
> you click the yellow spraycan.
>
>
> > I understood that the problem is likely it does not read argc and argv
> > from the command line.
> >
>
> You should fix your app. It's bad coding practice not to check the
> external prerequisites (CLI parameters, in this case) you assume. A
> bus error in case of a missing parameter is just the logical result
> of such practice.
>
> Markus
>
> - - - - - - - - - - - - - - - - - - -
> Dipl. Ing. Markus Hitter
> http://www.jump-ing.de/
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden