To: Stephen Turnbull , djgpp AT sun DOT soe DOT clarkson DOT edu From: Mike Piff Date: 16 Mar 94 09:28:43 Subject: Re: Graphics and C++ Reply-To: Mike Piff %%>Date: Wed, 16 Mar 94 14:09:30 JST %%>From: Stephen Turnbull %%>>%%>> 1) In graphics.h, lines 79-84, Blit appears to be declared twice. %%>>%%> %%>>%%>Yes, it is. With two different sets of arguments. Welcome to C++ - %%>>%%>you can do this! %%>> %%>>But when I compile, I get an error message. %%> %%>Are you sure you're using cc1plus? Try GCC -v. Make sure the source %%>is named nantoka.CC or other C++ extension. Note that header files %%>often get included in other header files, so you may not be aware that %%>you're including this header file into a C program. %%> %%> --Steve %%> The following file does not compile for me. I include my environment and also the output of gcc. Mike Piff TEST.CC #ifdef __cplusplus extern "C" { #endif #include #include #include #ifdef __cplusplus } #endif main() {} MY ENVIRONMENT: CPLUS_INCLUDE_PATH=c:/gnuc/cplusinc;c:/gnuc/include OBJCPLUS_INCLUDE_PATH=c:/gnuc/cplusinc C_INCLUDE_PATH=c:/gnuc/include OBJC_INCLUDE_PATH=c:/gnuc/include COMPILER_PATH=c:/gnuc/bin LIBRARY_PATH=c:/gnuc/lib TMPDIR=c:/gnuc/tmp GO32TMP=c:/gnuc/tmp GO32= 2r1 driver c:\gnuc\drivers\paradise.grd gw 640 gh 480 tw 80 th 25 nc 16 topline 387=YES GCC OUTPUT: Reading specs from c:/gnuc/lib/specs gcc version 2.5.7 c:/gnuc/bin/cpp.exe -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 - D__cplusplus -D__GNUC_MINOR__=5 -Dunix -Di386 -DGO32 -DMSDOS -D__unix__ - D__i386__ -D__GO32__ -D__MSDOS__ -D__unix -D__i386 -D__GO32 -D__MSDOS - D__OPTIMIZE__ test.cc c:/gnuc/tmp/cc000071 GNU CPP version 2.5.7 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: c:/gnuc/cplusinc c:/gnuc/include /usr/local/lib/g++-include /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.5.7/include /usr/include End of search list. c:/gnuc/bin/cc1plus.exe c:/gnuc/tmp/cc000071 -fno-builtin -quiet -dumpbase test.cc -O2 -version -o c:/gnuc/tmp/cca00071 GNU C++ version 2.5.7 (80386, BSD syntax) compiled by GNU C version 2.5.7. In file included from test.cc:7: c:/gnuc/include/graphics.h:84: conflicting types for `void Blit(class GrRegion *, int, int, int, int, class GrRegion *, int, int, enum GrBlitFunc)' c:/gnuc/include/graphics.h:81: previous declaration as `void Blit(class GrRegion *, class GrRegion *, int, int, enum GrBlitFunc)' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Dr M J Piff, School of Mathematics and Statistics, University of %% %% Sheffield, UK. e-mail: M DOT Piff AT sheffield DOT ac DOT uk %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%