[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using Lua in a C(++) program
- From: Enno Rehling <enno@...>
- Date: Thu, 12 Jun 2003 13:37:30 +0200
Alex Sandro Queiroz e Silva wrote:
Every now and then someone asks this same question. :-) Lua is also
valid C++ code, so one might want to compile it this way.
If more people ask, then probably because it's so uncommon. Make and other
build tools certainly wouldn't use the c++ compiler unless you force them
to, and why you wanted to do that, I don't know. So why allow that? And if
you really want to allow it, make sure people are aware of what they are
doing (making a lib that won't work with plain C), and have them explicitly
#define a variable (which could then also disable the extern "C" part).
Really. Haven't seen a library in years that didn't have a __cplusplus
encapsulated extern "C", and I've seen my share.
Enno.