Sign in to follow this  

Compiling LuaPlus on DevC++, Linking problem

Recommended Posts

This is driving me crazy .. I want to use LuaPlus in a small project. For this I got the latest sources of LuaPlus from I loaded the .vcproj files into Visual Studio.NET to get a solution file which I converted to old style VC6 dsp/dsw files. These files could be imported into DevC++. I had to turn off the annoying warnings, comment out a debugging call due to problems with wide character strings and change some code to get the classes exported correctly (extern after class is not allowed) Well. I got a library file now (libLuaPlusLib.a) which I copied to the DevC++ lib directory. I also copied the include files and then created a little test program:
#include <iostream>
#include <stdlib.h>

#include <LuaPlus/LuaPlus.h>

using namespace std;
using namespace LuaPlus;

int main(int argc, char *argv[])
    LuaState* pLuaState = LuaState::Create( true, false );
    pLuaState->DoFile( "test.lua" );
    return 0;

When I try to comile and link this, I get: [Linker error] undefined reference to `_imp___ZN7LuaPlus8LuaState6CreateEbb' [Linker error] undefined reference to `_imp__lua_dofile' I did adjust the linker parameters though by adding -lLuaPlusLib. Does anyone know what I might have forget? Regards, T.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this