Skip to main content
gamedev.net
🔒 Locked

Lua and dev-c++

Started by Ainokea Nov 19, 2004 at 9:11 PM 6 replies 1.1k views
Original Post
Ainokea
Ainokea
Im trying to embed lua with c++ and I am having problems with linking errors. I dont know what parameters I should pass to my Dev-C++ project in order to get my code to compile. Thanks.
______________With the flesh of a cow.
JTippetts
JTippetts
Are you having linking problems or compiling problems??

You do have libraries built for Dev-Cpp (Mingw), correct? If so, then -llua and -llualib passed to the linker should link the libraries in. If the libraries are not in your 'standard' link search path, be sure to include a -L/PATH/TO/LUA/LIBS directive as well.

Libraries built for Visual Studio will not work.
Ainokea
Ainokea
Quote:
Original post by VertexNormal
Libraries built for Visual Studio will not work.

I always forget that, thanks!
______________With the flesh of a cow.
Ainokea
Ainokea
Uhh where do I get the libs from? Can`t seem to find them.
______________With the flesh of a cow.
Diodor
Diodor
I myself simply added all the lua files to my project.
JTippetts
JTippetts
IIRC (it's been awhile), I simply started a new Dev-Cpp static lib project and dumped all the source files from /src into it to build the liblua.a library. I started another project for the liblualib.a library using the source files in src/lib. You could try googling for pre-build binaries, but it should be pretty simple to build them yourself.
Ainokea
Ainokea
I get an error saying:
unable to run program file.

But that doesnt make sense since you dont execute a static library.
______________With the flesh of a cow.
Ainokea
Ainokea
Fixed it with a reinstall.
______________With the flesh of a cow.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.