[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Using Lua in a C(++) program
- From: Asko Kauppi <asko.kauppi@...>
- Date: Wed, 11 Jun 2003 01:05:51 +0300
I'm not sure your c++ problem is based on Lua.
The line you reported earlier:
/tmp/ccV9wgqi.o(.eh_frame+0x11): undefined reference to
comes from mingw32/gcc when it tries to compile stuff as c++ but
doesn't find the necessary runtime libraries when linking it.. I faced
this when my source had CAPITAL names (unintentional though it was).
The .C suffix confuses mingw to think it's c++.
So first thing:
- Make sure all your C files are *.c and all -real- c++ files *.cpp.
NEVER use capital c. :)
If that's not the cure:
- Lua itself should compile either as c, or c++ (there really is some
difference, under the hood). So i don't think it's that.
- If you're still missing the c++ runtime libs, there's probably some
link flag or something you need to set. Look with
"__gxx_personality_v0" via Google, perhaps?
Johannes Hager kirjoittaa keskiviikkona, 11. kesäkuuta 2003, kello
Fine it works. But can anyone tell me how to use lua in a C++ project.
way their was the problem. I have used the gcc but named my file
You need to add -lm to the compile (that's the math library)