Skip to main content
gamedev.net
🔒 Locked

Compiling LuaPlus on DevC++, Linking problem

Started by TroneX Dec 1, 2004 at 8:32 AM 0 replies 1.6k views
Original Post
TroneX
TroneX
This is driving me crazy .. I want to use LuaPlus in a small project. For this I got the latest sources of LuaPlus from www.luaplus.org. 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" );
    system("PAUSE");	
    
    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.
TroneX
TroneX
I figured out myself what was wrong. If anyone is interested, PM me, thanks.

T.

Topic Locked

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

Sign in to reply to this topic.