discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Great Moments in Mystifying Compiler Messages...


From: Citizen Jimserac
Subject: Re: Great Moments in Mystifying Compiler Messages...
Date: Wed, 15 Aug 2012 16:28:41 -0700 (PDT)
User-agent: G2/1.0

On Aug 15, 7:13 pm, Ivan Vučica <ivuc...@gmail.com> wrote:
> When you're compiling software, your build directory is not
> referenced; instead, the installed frameworks are referenced. If you
> are sure you want to add a file, add it to Source/GNUmakefile.
> However, you almost certainly don't want to do so in this case. (Which
> file would you be copying, anyway?)
>
> Greg, Cocoa does seem to contain NSErrors.h, although it's obscure. It
> seems to only define several externs for NSString constants referring
> to various exceptions, such as NSTextLineTooLongException or
> NSWindowServerCommunicationException. These seem to be already defined
> in AppKitExceptions.h.
>
> J., ToyViewer seems to be #ifdef'ing this in case __COCOA_ is defined.
> At least this piece of its code does:
>  http://svn.gna.org/svn/gsimageapps/trunk/Applications/ToyViewer/TVCtr...
> So what you want to do is simply remove these lines or add #ifdef
> __COCOA_ around this header. Then contact maintainer of the app and
> submit a patch.
>
>  Alternatively, check why __COCOA_ ends up being defined for you.
>
> On 8/15/12, Citizen Jimserac <jimse...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > On Aug 15, 5:19 pm, Gregory Casamento <greg.casame...@gmail.com>
> > wrote:
> >> There is no file called NSErrors.h in AppKit.  There is a file called
> >> NSError.h in Foundation.
>
> >> GC
>
> >> On Wed, Aug 15, 2012 at 3:27 PM, Citizen Jimserac <jimse...@gmail.com>
> >> wrote:
> >> > Am compiling a ".m" and have a bunch of include files ...
>
> >> > All four of these includes are in the /home/wuming/gnustep/core/gui/
> >> > Headers/AppKit direcotry
>
> >> > #import <AppKit/NSApplication.h>
> >> > #import <AppKit/NSImage.h>
> >> > #import <AppKit/NSPasteboard.h>
> >> > #import <AppKit/NSErrors.h>
>
> >> > Compiler finds the first 3 no problem but errors out on the last with
> >> > a
> >> > "fatal error"   "file not found" on the NSErrors.h
>
> >> > But... if I change to an explicit path in the import for it... as in
> >> > (see below)
>
> >> > #import <AppKit/NSApplication.h>
> >> > #import <AppKit/NSImage.h>
> >> > #import <AppKit/NSPasteboard.h>
> >> > #import "/home/wuming/gnustep/core/gui/Headers/AppKit/NSErrors.h"
>
> >> > It find it no problem and the compile proceeds merrily along (!!)
>
> >> > What am I missing ??
>
> >> > Thanks
> >> > J.
>
> >> > _______________________________________________
> >> > Discuss-gnustep mailing list
> >> > Discuss-gnus...@gnu.org
> >> >https://lists.gnu.org/mailman/listinfo/discuss-gnustep
>
> >> --
> >> Gregory Casamento
> >> Open Logic Corporation, Principal Consultant
> >> yahoo/skype: greg_casamento, aol: gjcasa
> >> (240)274-9630 (Cell)http://www.gnustep.orghttp://heronsperch.blogspot.com
>
> > I know.
>
> > I just copied it in.
>
> > How else could I compile ToyViewer ?
>
> > Thanks
> > J.
> > _______________________________________________
> > Discuss-gnustep mailing list
> > Discuss-gnus...@gnu.org
> >https://lists.gnu.org/mailman/listinfo/discuss-gnustep
>
> --
> Ivan Vučica - i...@vucica.net

Ah!  The plot thickens, I should have known....

I found a number of older example GNUStep programs, some of them, like
ToyViewer, with REALLY INTERESTING code in them.  These older
programs, from around the years 2000 - 2005, almost never compile
properly in modern GNUStep, for reasons such as Ivan has kindly
explained here.  They can be found in various web hideaways, usually a
trip to www.archive.org is sufficient to ferret them out.   Some of
Pero's excellent example programs and his wonderful GNUSTEP Cookbook
can be found out there too, they are quite good.

For example, in this same ToyViewer program,  some includes, such as
NSPICTImageRep.h were missing but again I just searched, found them,
copied them in and compile away!

I stumble on language issues too, for example I'm trying to figure out
this one right now:
In file included from MyDocument.m:22:
./PRCustTraceEdges.h:19:127: warning: declaration of 'enum
medianForms' will not
      be visible outside of this function [-Wvisibility]
  ...:(BOOL)useZeroCross :(BOOL)enable1 :(enum medianForms)form1 :
(int)size1...
                                               ^
MyDocument.m:418:96: error: argument type 'enum medianForms' is
incomplete
  ...:filterType :thLev :doZeroC :do1 :form1 :size1 :sep1 :do2 :form2 :size2...
                                       ^~~~~
./PRCustTraceEdges.h:19:127: note: forward declaration of 'enum
medianForms'
  ...:(BOOL)useZeroCross :(BOOL)enable1 :(enum medianForms)form1 :
(int)size1...

Here the warnings seem to tell me more than the error message, I'll
figure it out!

Thanks Ivan and everyone!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]