Jump to content

  • Log In with Google      Sign In   
  • Create Account

LUA - PLEEEESE help :P


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Saintly   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 September 2001 - 01:09 AM

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 ..

Sponsor:

#2 Shannon Barber   Moderators   -  Reputation: 1372

Like
Likes
Like

Posted 09 September 2001 - 03:51 PM

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

#3 Saintly   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 September 2001 - 10:18 PM

Yes I did ... I''m not totally outta it.

I said I''ve tried most everything...

#4 Dog_Food   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 September 2001 - 11:42 AM

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.

#5 jaxson   Members   -  Reputation: 127

Like
Likes
Like

Posted 10 September 2001 - 02:59 PM

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!

#6 Saintly   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 September 2001 - 07:15 PM

D''uh! ... I bet I read just that thing somewhere in the LUA example files .

How could I forget that ... Guess I''ve been too sleepy after work these days .

Thanks, I''ll try this once I git home. If it doesn''t work, I''ll come back and whine some more .




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS