Thread View: comp.sys.mac.programmer.codewarrior
4 messages
4 total messages
Started by News Reader
Sat, 12 Oct 2002 20:56
What am I doing wrong? 'illegal constant expression'??
Author: News Reader
Date: Sat, 12 Oct 2002 20:56
Date: Sat, 12 Oct 2002 20:56
37 lines
1904 bytes
1904 bytes
What am I doing wrong here? I'm using Codewarrior8 on MacOSX. All this compiled fine before under Codewarrior7 on MacOSX. What am I missing? I'm using CW8's MacOSX target setting (not Apple's MacOSX). Error : illegal constant expression (included from: IOKitLib.h:48 CGDisplayConfiguration.h:11 CoreGraphics.h:20 QD.h:25 ApplicationServices.h:30 carbon.h:24 MgcOpenGLIncludes.h:26 MgcOpenGLRenderer.h:23 MgcAglRenderer.h:22 MgcAglRenderer.cpp:21) OSMessageNotification.h line 83 unsigned char content[0]; Error : illegal constant expression (included from: IOKitLib.h:48 CGDisplayConfiguration.h:11 CoreGraphics.h:20 QD.h:25 ApplicationServices.h:30 carbon.h:24 MgcOpenGLIncludes.h:26 MgcOpenGLRenderer.h:23 MgcAglRenderer.h:22 MgcAglRenderer.cpp:21) OSMessageNotification.h line 93 void * args[0]; I can't have an array of size 1??
Re: What am I doing wrong? 'illegal constant expression'??
Author: Daniel T.
Date: Sat, 12 Oct 2002 23:22
Date: Sat, 12 Oct 2002 23:22
47 lines
2369 bytes
2369 bytes
News Reader <nntp@r.us> wrote: > What am I doing wrong here? I'm using Codewarrior8 on MacOSX. All > this compiled fine before under Codewarrior7 on MacOSX. > What am I missing? I'm using CW8's MacOSX target setting (not Apple's > MacOSX). > > > Error : illegal constant expression > (included from: > IOKitLib.h:48 > CGDisplayConfiguration.h:11 > CoreGraphics.h:20 > QD.h:25 > ApplicationServices.h:30 > carbon.h:24 > MgcOpenGLIncludes.h:26 > MgcOpenGLRenderer.h:23 > MgcAglRenderer.h:22 > MgcAglRenderer.cpp:21) > OSMessageNotification.h line 83 unsigned char content[0]; > > Error : illegal constant expression > (included from: > IOKitLib.h:48 > CGDisplayConfiguration.h:11 > CoreGraphics.h:20 > QD.h:25 > ApplicationServices.h:30 > carbon.h:24 > MgcOpenGLIncludes.h:26 > MgcOpenGLRenderer.h:23 > MgcAglRenderer.h:22 > MgcAglRenderer.cpp:21) > OSMessageNotification.h line 93 void * args[0]; > > > > I can't have an array of size 1?? To get an array size of 1 you need to: unsigned char content[1]; Then you access that element by using: content[0];
Re: What am I doing wrong? 'illegal constant expression'??
Author: Sean McBride
Date: Tue, 15 Oct 2002 23:22
Date: Tue, 15 Oct 2002 23:22
40 lines
2196 bytes
2196 bytes
In article <b80cquo5frrpptgjbg8v0juu5d2dom7hk9@4ax.com>, News Reader <nntp@r.us> wrote: > What am I doing wrong here? I'm using Codewarrior8 on MacOSX. All > this compiled fine before under Codewarrior7 on MacOSX. > What am I missing? I'm using CW8's MacOSX target setting (not Apple's > MacOSX). > > > Error : illegal constant expression > (included from: > IOKitLib.h:48 > CGDisplayConfiguration.h:11 > CoreGraphics.h:20 > QD.h:25 > ApplicationServices.h:30 > carbon.h:24 > MgcOpenGLIncludes.h:26 > MgcOpenGLRenderer.h:23 > MgcAglRenderer.h:22 > MgcAglRenderer.cpp:21) > OSMessageNotification.h line 83 unsigned char content[0]; > > Error : illegal constant expression > (included from: > IOKitLib.h:48 > CGDisplayConfiguration.h:11 > CoreGraphics.h:20 > QD.h:25 > ApplicationServices.h:30 > carbon.h:24 > MgcOpenGLIncludes.h:26 > MgcOpenGLRenderer.h:23 > MgcAglRenderer.h:22 > MgcAglRenderer.cpp:21) > OSMessageNotification.h line 93 void * args[0]; I've seen this too. Some of Apple headers don't complile if CW's 'ANSI strict' option is on. Turning it off should fix these errors. Apple needs to improve their headers, do file a bug with them.
Re: What am I doing wrong? 'illegal constant expression'??
Author: XBoy
Date: Mon, 21 Oct 2002 17:10
Date: Mon, 21 Oct 2002 17:10
45 lines
2619 bytes
2619 bytes
Thanks! That fixed the problems. "Sean McBride" <cwatson@cam.org> wrote in message news:cwatson-07AAD6.19220015102002@aeinews.aei.ca... > In article <b80cquo5frrpptgjbg8v0juu5d2dom7hk9@4ax.com>, > News Reader <nntp@r.us> wrote: > > > What am I doing wrong here? I'm using Codewarrior8 on MacOSX. All > > this compiled fine before under Codewarrior7 on MacOSX. > > What am I missing? I'm using CW8's MacOSX target setting (not Apple's > > MacOSX). > > > > > > Error : illegal constant expression > > (included from: > > IOKitLib.h:48 > > CGDisplayConfiguration.h:11 > > CoreGraphics.h:20 > > QD.h:25 > > ApplicationServices.h:30 > > carbon.h:24 > > MgcOpenGLIncludes.h:26 > > MgcOpenGLRenderer.h:23 > > MgcAglRenderer.h:22 > > MgcAglRenderer.cpp:21) > > OSMessageNotification.h line 83 unsigned char content[0]; > > > > Error : illegal constant expression > > (included from: > > IOKitLib.h:48 > > CGDisplayConfiguration.h:11 > > CoreGraphics.h:20 > > QD.h:25 > > ApplicationServices.h:30 > > carbon.h:24 > > MgcOpenGLIncludes.h:26 > > MgcOpenGLRenderer.h:23 > > MgcAglRenderer.h:22 > > MgcAglRenderer.cpp:21) > > OSMessageNotification.h line 93 void * args[0]; > > I've seen this too. Some of Apple headers don't complile if CW's 'ANSI > strict' option is on. Turning it off should fix these errors. Apple > needs to improve their headers, do file a bug with them.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads