Error : ANSI C++ forbids 'xx' declaration with no type


 
Thread Tools Search this Thread
Top Forums Programming Error : ANSI C++ forbids 'xx' declaration with no type
# 1  
Old 06-25-2003
Question Error : ANSI C++ forbids 'xx' declaration with no type

Hi All,
I am not sure if this is the correct place to put this question but still i hope to get some info.

I am compiling a c++ program on solaris 8 using c++ command, i get an error stating "ANSI C++ forbids declaration `genericerror' with no type"

What could be the problem. the compiler or do i need to link some library or is it the os???









c++ -library=iostream,no%Cstd -g -DDEBUG -fPIC -D_REENTRANT --D_MBCS -I/export/home/sdk/rapi/include -I/export/home/sdk/rqapi/include -I -c -o test.o test.cpp
In file included from /export/home/sdk/rapi/include/rw/defs.h:401,
from /export/home/sdk/rapi/include/rw/tooldefs.h:35,
from /export/home/sdk/rapi/include/rw/rwdate.h:36,
from /export/home/sdk/rapi/include/rw/colldate.h:32,
from /export/home/sdk/rapi/include/acrapi.h:19,
from test.cpp:11:
/export/home/sdk/rapi/include/rw/generic.h:80: ANSI C++ forbids declaration `genericerror' with no type
In file included from /export/home/sdk/rapi/include/util/msg.h:20,
from /export/home/sdk/rapi/include/util/notice.h:17,
from /export/home/sdk/rapi/include/util/clntconn.h:19,
from /export/home/sdk/rapi/include/acrapi.h:33,
from test.cpp:11:
/export/home/sdk/rapi/include/util/port.h:16: warning: decimal integer constant is so large that it is unsigned
In file included from /export/home/sdk/rapi/include/util/notice.h:17,
from /export/home/sdk/rapi/include/util/clntconn.h:19,
from /export/home/sdk/rapi/include/acrapi.h:33,
from test.cpp:11:
/export/home/sdk/rapi/include/util/msg.h:151: warning: `AcMessageImpl' is already a friend of `AcMessage'
/export/home/sdk/rapi/include/util/msg.h:152: warning: `AcMessageWrapper' is already a friend of `AcMessage'
make: *** [test.o] Error 1
bash-2.03#
# 2  
Old 06-26-2003
Sorry for the trouble guys ,
i managed to solve it ... i had to use CC and not c++.
# 3  
Old 06-26-2003
You might want to check out Sunsolve - Bug report 4296832 specifically. Solaris 8 Patches for this are listed in it (108652-66 for sparc and 108653-55 for X86)
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Logical Error With Type Conversion In C

So, I'm into about 650 lines of some code I'm working on. So I'll try to explain instead of flooding this post. Say I have some code like this: int main() { int i, j; char data; printf("Gimme something: "); fgets(data, INPUT_BUFF, stdin); for (j = 0; j < data; j++){... (6 Replies)
Discussion started by: Azrael
6 Replies

2. Shell Programming and Scripting

Error type order

Hi all, Sample data file... 9f680197||y|a|6 9f6801||6 9f68017|20120511|y|6 9f68017|y|1 9f68017|6 9f68017|20120511|N|2 9f68017|MD|212343907|20120511|N|2 9f68017212343907|20120511|N|2 9f68017N|3 9f68017|20120511|y|3 9f68017|MD|212343907|20120511|N|3 9f68017|MD|212343907|20120511|y|3... (3 Replies)
Discussion started by: bmk
3 Replies

3. Red Hat

What type of error is this?

:rolleyes::rolleyes::rolleyes: Jul 18 19:31:31 plbp1s sendmail: STARTTLS: read error=syscall error (-1), errno=104, get_error=error:00000000:lib(0):func(0):reason(0) ---------- Post updated at 03:08 AM ---------- Previous update was at 03:07 AM ---------- # cat /var/log/maillog|egrep -i... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

4. Programming

error: expected declaration specifiers or '...' before syslog

When I compile this i get the following error "error: expected declaration specifiers or '...' before syslog" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #define __LIBRARY__ #include <linux/unistd.h> /* define the system call, to override the library... (6 Replies)
Discussion started by: dragonpoint
6 Replies

5. Programming

why the implementatoin of Bakery algorithm in ANSI C does not work in ANSI C

I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry? Only print out: Thread ID: 0 START! Thread ID: 0 END! Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies

6. UNIX for Dummies Questions & Answers

Build Error: error: dereferencing pointer to incomplete type

I'm getting the following Error: prepare_pcap.c: In function `prepare_pkts': prepare_pcap.c:127: error: dereferencing pointer to incomplete type prepare_pcap.c:138: error: dereferencing pointer to incomplete type ==================================== This is the part of the relevant... (8 Replies)
Discussion started by: katwala
8 Replies

7. Shell Programming and Scripting

Convert file from Unix - ANSI to PC - ANSI

Hi, I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this? Thanks, Sunil (0 Replies)
Discussion started by: ssmallya
0 Replies

8. Programming

error: field has incomplete type

Hello there, Here is how it goes - I have written a small test driver as an exercise to "Linux Device Drivers" and as a preparation for writing a real, functional driver. For the sake of seeing how far I got it working (I already implemented the open(0, read(), write() and ioctl() calls) I... (4 Replies)
Discussion started by: boyanov
4 Replies

9. Solaris

Unknown File Type error

Greetings there, i was trying to install an eclipse plugin on sunOS 4.x for the solaris sparc platform, and i got the following error: /usr/project/RAServer/bin> ./RAStart.sh Starting Agent Controller ld.so.1: RAServer: fatal: /usr/project/RAServer/lib/libxerces-c.so.24: unknown file type... (3 Replies)
Discussion started by: rohitsz
3 Replies
Login or Register to Ask a Question