I don't know what Lua40 or Lua50 are, but try compiling in C++ mode and put
your C declarations inside "alternate C linkage" like this:
extern "C"
{
#include "Myheader.h"
}
Hope this helps.
>From: Asko Kauppi <ask...@sc...>
>To: dev...@li...
>Subject: [Dev-C++] How to force C linkage?
>Date: Wed, 26 Feb 2003 15:36:28 +0200
>
>
>My problems with C/C++ differences still continue:
>
>- I have two almost identical libraries that I want to compile (with DevCpp
>4.9.7.0). Lua40 (scripting language engine) compiles okay (objdump shows
>proper ANSI C function names), but (a newer version) Lua50 creates C++
>mangled function names in the .o files.
>
>How can I prevent this and what might be causing it?
>
>I've tried "-xc" as compiler option (to force C language) - didn't work.
>I've lower-cap'd all the filenames so that they're not mistaken to be .C .
>The source itself should be plain ANSI C only, not C++.
>
>Can it be some old temporary file lurking somewhere, from the time my files
>were .C ...?
>Any other ideas?
>
>-ak
>
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
|