• Advertisement
Sign in to follow this  

LUA linker problem

This topic is 2626 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there,

I'm willing to place a scripting language in my C/C++ app. I've heard that LUA is very suitable for my purposes. But unfortunately I have problem with building it/including it.

I have tried to build it with bcc32.exe (borland compiler).
I got few warnings and unresolved external error.

I have tried using installer distribution build for windows and after including

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

}

int main()
{
lua_State *L = lua_open();
lua_close(L);
return 0;
}

all *.h files I get (lib folder has been added to linker paths):

[Linker Error] Error: Unresolved external '_luaL_newstate' referenced from H:\~path
[Linker Error] Error: Unresolved external '_lua_close' referenced from H:\~path

I tried also including header files from source distribution, and I get the same error. Being aware that bcb compiler causes sometimes problems I have also tried using g++ and gcc, and I have the same errors :(

How to fix it?
Thanks in advance for answers and suggestions :]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Misery
all *.h files I get (lib folder has been added to linker paths):


But do you actually specify the library name i.e. add -llua (GCC) or lua.lib (Borland) to your linker command line?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement