LUA - PLEEEESE help :P
I read through the Lua docs and found that it''d be a good programming lang to use in a game I do in my spare time ... buut ...
The precompiled libs for VC6 won''t link properly (Like, no functions exist in the libs ;P. All unresolved externals).
Sooo ... I''m in need of help here.. Either someone who''s smart enough to recompile libraries for VC6 using the source. (I aint into putting libs together from their source dist, I stick with programming libs from scratch in winblows )
...or someone who can tell me how to use the precompiled libs found on the Lua page. I''ve tried most everything, but it wont work.
C''mon you guys ..
Did you include the libraries in your project?
And do you have a path to point to where they''re at?
Tools->Options->Directories->Libraries...
#pragma comment(lib, "lua.lib")
Magmai Kai Holmlor
- Not For Rent
And do you have a path to point to where they''re at?
Tools->Options->Directories->Libraries...
#pragma comment(lib, "lua.lib")
Magmai Kai Holmlor
- Not For Rent
I had a similar problem with that. For some reason, compiling with the .c or .cpp extension makes a difference. You can include just fine if you compile your main as main.c, or if you rename the lua files to have a .cpp extension.
Dog_Food is on the right track. C++ and C have different name decoration techniques that are used by the compiler to distinguish between, for example
int func(void)
and
int func(int a)
What you probably need to do is tell the compiler that the LUA header files are for C functions. You do it like this:
extern "C"
{
#include "lua.h"
}
Anything that you declare as extern "C" will use C naming rules. It sounds like this is probably your problem, although I can''t be 100% sure because I''ve never used LUA.
Hope that helps!
int func(void)
and
int func(int a)
What you probably need to do is tell the compiler that the LUA header files are for C functions. You do it like this:
extern "C"
{
#include "lua.h"
}
Anything that you declare as extern "C" will use C naming rules. It sounds like this is probably your problem, although I can''t be 100% sure because I''ve never used LUA.
Hope that helps!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement