POV-Ray : Newsgroups : povray.programming : mixing POV code with C++ : Re: mixing POV code with C++ Server Time
29 Jul 2024 00:35:09 EDT (-0400)
  Re: mixing POV code with C++  
From: Nigel Stewart
Date: 10 Feb 1999 08:37:55
Message: <36c18bb3.0@news.povray.org>
>The files have a *.c extension, so the compiler disables C++ syntax. Try to
>force C++ compilation: I don't know if there is such an option, you can
>anyway rename the files from *.c to *.cpp and try.


Also, remember to expose you c interface via extern "c" {  <prototypes> }

As an example header, that compiles in both C and C++ for VC5.0:

#ifdef __cplusplus
extern "C"

#endif

///////////////////////////////////////////
//
// C Interface for TarFileSystemDatabase
//

void       TF_caseSensitive(int flag);

int        TF_addTarFile(const char *filename);
int        TF_addTarFiles(const char *directory);

FILE         *TF_file(const char *filename,const char *mode);
unsigned long TF_sizeOf(const char *filename);

//
//
/////////////////////////////////////////////

#ifdef __cplusplus
}
#endif


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.