Jump to content
  • Advertisement
Sign in to follow this  

Compiling LuaPlus on DevC++, Linking problem

This topic is 4979 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

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" );
    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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!