Page 2 of 2

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 11:19 am
by Cole S.
i have the .lib files now but also a dll not a static linked library

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 11:45 am
by Cole S.
You know what? I'm going to clear my computer of anything that has to do with lua and start all over again... Now if someone could write a short and sweet guide on how they installed it, or show me where they learned to, that would be great. For now I am going to download Lua 5.1.4 source code.

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 11:54 am
by avansc
Cole S. wrote:You know what? I'm going to clear my computer of anything that has to do with lua and start all over again... Now if someone could write a short and sweet guide on how they installed it, or show me where they learned to, that would be great. For now I am going to download Lua 5.1.4 source code.
did you just ask a rhetorical question?

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 3:54 pm
by Cole S.
Lol, I had to look up the definition for rhetorical (i'm 13) but yeah i kind of am!

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 3:57 pm
by cypher1554R
Cole S. wrote:For now I am going to download Lua 5.1.4 source code.
Really? That could have been your problem. If you intend to just use Lua, then you should get the bin package.

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 3:58 pm
by Cole S.
can i redistribute the bin package?

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 4:21 pm
by PixelP

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 5:58 pm
by Cole S.
i downloaded a binary but now when i try to run a sample script i get a blank line in the exe, here is the code:

#include <iostream>

using namespace std;
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}

int main()
{
lua_State *L = lua_open();

// load the libs
luaL_openlibs(L);

//run a Lua script here
luaL_dofile(L,"hello.lua");

lua_close(L);

return 0;
}

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 6:37 pm
by avansc
i seriously dont know why this is even a thread.

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 9:59 pm
by MarauderIIC
Cole, use the [code] and [/code] tags, would you? As for lua, it's not something I can help you with, besides, um, does your .lua file that you do there, does it actually, yknow, print?

Re: Embedding Lua in Visual C++ 2008

Posted: Sun Dec 07, 2008 10:07 pm
by Falco Girgis
We can't help you if we don't have the source of the lua test file. For all we know, it's doing its thang.

Re: Embedding Lua in Visual C++ 2008

Posted: Mon Dec 08, 2008 6:18 pm
by Cole S.
Thx for the help u guys it's working now. :)

Re: Embedding Lua in Visual C++ 2008

Posted: Mon Dec 08, 2008 6:58 pm
by MarauderIIC
Glad you got it working.