Indigo Rose Software
  #1  
Old 10-17-2004
Eltari13 Eltari13 is offline
Forum Member
 
Join Date: Oct 2004
Posts: 2
Lua and VC++

Hi everyone ^^' I am a noob to C++ (just came from BlitzBasic 3d) and I'm trying to implement LUA as a scripting engine that controlls a program in blitz. My idea was to compile all the lua libs into a dll and write a bridge dll that would do all the thinking and just use callback to tell the application what to do. But.. I got stuck on step one. There are several tutorials showing the very basics of implementing LUA but I cant even get the ****ed things to compile when copy-pasted!

The particular tutorial i'm talking about is at http://tonyandpaige.com/tutorials/lua1.html

I did everything as the instructions for the first step said, copy-pasted the code provided, tried to compile it in VC++ 6 and got all this rubbish:

Core.obj : error LNK2001: unresolved external symbol _lua_close
Core.obj : error LNK2001: unresolved external symbol _lua_dofile
Core.obj : error LNK2001: unresolved external symbol _luaopen_base
Core.obj : error LNK2001: unresolved external symbol _lua_open
Debug/Lua testing.exe : fatal error LNK1120: 4 unresolved externals

Um.. Can anyone point me in the right direction?
Thanks in advance ^^'
Reply With Quote
  #2  
Old 10-17-2004
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
Have you added the the Lib and Include folders for LUA to the IDE?

Also have you added lua+lib.lib to Project/Settings/Link Object Library Modules?

The other thing is to be sure to include the lua includes in this manner:

extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}

Last edited by Worm; 10-17-2004 at 07:36 AM.
Reply With Quote
  #3  
Old 10-17-2004
Eltari13 Eltari13 is offline
Forum Member
 
Join Date: Oct 2004
Posts: 2
Ah, thanks. I was running ahead of myself there and didn't link to the Lua+lib file. However, I had to go off and download it from the link on the site. It's nowhere to be found in the lua release (with included binaries) I got off the official site. Would I need to compile it otherwise? From which files?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 04:04 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software