lua.lib and vc++

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

lua.lib and vc++

Matthias Gall
hello everyone,

i tried to implement lua 4 with visual c++ using lua.lib (taken from
windows-directory of the lua ftp server) and lua.h, but i always got
unresolved externals when calling lua_open, or lua_close (those were the
only commands i tried). i even tried to rebuild the whole library, but it
did not work. i am using vc++ 6.0 enterprise edition. anyone got an idea?

matt


Reply | Threaded
Open this post in threaded view
|

Re: lua.lib and vc++

Terence Martin-2
> i tried to implement lua 4 with visual c++ using lua.lib (taken from
> windows-directory of the lua ftp server) and lua.h, but i always got
> unresolved externals when calling lua_open, or lua_close (those were the
> only commands i tried). i even tried to rebuild the whole library, but it
> did not work. i am using vc++ 6.0 enterprise edition. anyone got an idea?

The only two things I can think of is that either you forgot to add the
library to the linker settings, or your test source files have a .cpp
extension, in which case you probably need something like:

extern "C" {
#include <lua.h>
}