Article View: comp.windows.interviews
Article #1383ActionCallback ... problem
From: Yalamanchi Prasad
Date: Sun, 20 Dec 1992 18:39
Date: Sun, 20 Dec 1992 18:39
53 lines
2297 bytes
2297 bytes
I am unable to compile .../iv3.1/iv/src/examples/menu/main.c program. Following are
the compiler warning/error messages.
---- BEGIN
/sysprod2/lang/CC/sun4/CC -Dcplusplus_2_0 -I/interviews/include -c ../main.c
CC ../main.c:
cc -c -I/sysprod2/lang/CC/sun4/incl -I/interviews/include main.c
"../main.c", line 63: warning: illegal combination of pointer and integer, op =
"../main.c", line 63: warning: shortening &filemenu may lose significance
"../main.c", line 63: illegal initialization
"../main.c", line 63: warning: illegal combination of pointer and integer, op =
"../main.c", line 63: warning: shortening &editmenu may lose significance
"../main.c", line 63: warning: illegal combination of pointer and integer, op =
"../main.c", line 63: warning: illegal combination of pointer and integer, op =
"../main.c", line 63: warning: shortening &colormenu may lose significance
"../main.c", line 63: warning: illegal combination of pointer and integer, op =
*** Error code 1
make: Fatal error: Command failed for target `main.o'
Current working directory /export/data3/prasad/iv3.1/iv/src/examples/menu/SUN4
---- END
Without the Preprocessor macros it seems to compile. Like the code below
//declareActionCallback(App)
//implementActionCallback(App)
struct CmdInfo {
const char* str;
// ActionMemberFunction(App) func;
void (*func) ();
CmdInfo* submenu;
int options;
} ;
replacing all the pointer-to-memberfuncs in the structures with a dummy func like
void dummy() {;}
CmdInfo filemenu[] = {
{ "Open", dummy },
{ "Save", dummy },
{ "", nil },
{ "Quit", dummy },
{ nil }
};
I would appreciate anyone's help/suggestions.
Note: I am using SUN 2.1 CC ( No Templates !!)
Thanks
prasady@hou.amoco.com
Technical Details
Message-ID:
<1992Dec20.183937.2221@hou.amoco.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!hri.com!spool.mu.edu!umn.edu!noc.msc.net!uc.msc.edu!apctrc!wsc!palsun18!zpvy0aShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!hri.com!spool.mu.edu!umn.edu!noc.msc.net!uc.msc.edu!apctrc!wsc!palsun18!zpvy0a From: zpvy0a@hou.amoco.com (Yalamanchi Prasad) Newsgroups: comp.windows.interviews Subject: ActionCallback ... problem Message-ID: <1992Dec20.183937.2221@hou.amoco.com> Date: 20 Dec 92 18:39:37 GMT Sender: news@hou.amoco.com Reply-To: zpvy0a@hou.amoco.com Organization: Amoco Lines: 53