From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,249650212162921c X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-11-29 07:10:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!vixen.cso.uiuc.edu!howland.erols.net!newshub.northeast.verio.net!verio!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!sac.uu.net!news.compaq.com!news.cpqcorp.net!not-for-mail From: Newsgroups: comp.unix.tru64 References: <9u2a71$epr@nntpb.cb.lucent.com> <0a6N7.2038$RL6.62621@news.cpqcorp.net> <9u41vp$jse@nntpb.cb.lucent.com> Subject: Re: build error on OSF : must specify a type --- (badparsedecl ! (Can build on Solaris and HP) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <1esN7.2106$RL6.63188@news.cpqcorp.net> Date: Thu, 29 Nov 2001 10:10:52 -0500 NNTP-Posting-Host: 16.28.0.211 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 1007046653 16.28.0.211 (Thu, 29 Nov 2001 07:10:53 PST) NNTP-Posting-Date: Thu, 29 Nov 2001 07:10:53 PST Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:5959 Danny and I have exchanged mail. It seems that the source was a C++ source but the file extension was .c. Because of the .c extension, the C compiler was invoked to process the file. Danny resolved the problem by changing the extension to .cpp. An alternate suggestion would be to involke the C++ compiler with the -x cxx option. Ed "Chen, HuoPing (Danny)" wrote in message news:9u41vp$jse@nntpb.cb.lucent.com... | Ed, | | My program is really a c file, and we just use C++ compiler bacause our | 3rd party library we used in this file are C++ lib. | My program like the following: | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | #include | #ifdef __cplusplus | extern "C" { | #endif | | #include | #include .... | | .... | static void convert_in_cp874(char* out, int out_len, char* in) | { | BufferCharSource cp874Source(in); // Error is here!!! | InternalEncodingConverter fromCP874(cp874Source, | ExternalEncoding::CP874(), InternalEncoding::Unicode20()); // Error here | BufferCharSink outSink(out, out_len); // Error here | InternalEncodingConverterSink sinkToUTF8(InternalEncoding::Unicode20(), | ExternalEncoding::Unicode20UTF8(), outSink); // Error here | sinkToUTF8.Put(fromCP874); | } | | EXPORT int abp_set_localcharset(int page_number) { | switch (page_number) { | case ARB_CP874: | convert_in = convert_in_cp874; | convert_out = convert_out_cp874; | break; | case ... | ... | } | | #ifdef __cplusplus | } | #endif | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | Regards, | Danny. | | | | wrote in message | news:0a6N7.2038$RL6.62621@news.cpqcorp.net... | > This message is from the C (not the C++) compiler. | > | > Can you post a small program that demonstrates | > the problem? | > | > Ed Vogel | > Compaq C Engineering | > | > | > | > "Chen, HuoPing (Danny)" wrote in message | > news:9u2a71$epr@nntpb.cb.lucent.com... | > | Hi, I experienced the following errors when I build my files with | Rosette | > | function calls on DEC machine. | > | | > | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | > | cc: Error: api_charset.c, line 119: In this declaration, | > | "InternalEncodingConverter" must specify a type. (badparsedecl) | > | InternalEncodingConverter fromCP874(cp874Source, | > | ExternalEncoding::CP874(), InternalEncoding::Unicode20()); | > | | > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | > | My DEC environment is: | > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | > | OSF1 V5.1 732 alpha | > | C++ compiler is: | > | Compaq C++ V6.3-008 for Compaq Tru64 UNIX V5.1 (Rev. 732) | > | Compiler Driver V6.3-008 (cxx) cxx Driver | > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | > | | > | | > | I can build it successfully on SUN Solaris 5.8 and HP11. | > | | > | | > | Your help is greatly appreciated! | > | | > | Danny Chen. | > | | > | | > | | > | > | |