title: How to use ZeroBrane Studio IDE debugger when lua is compiled as c++
body: <p>I have compiled Lua 5.3 as a 32 bit c++ DLL and exe. The DLL contains all the lua code except for lua.cpp and luac.cpp. The exe compiles lua.cpp and uses the DLL to run the lua interpreter. This works fine when running on its own from the command line. I wish to be able to run from the IDE using this DLL and exe.</p>
  
  <p>If I replace <code>/ZeroBraneStudio/bin/lua53.dll</code> and <code>lua53.exe</code> with my own versions, I can run scripts (clicking the two green arrows). However, debugging does not work, giving the following error: </p>
  
  <blockquote>
    <p>The procedure entry point luaL_addlstring could not be located in the dynamic link library lua53.dll.</p>
  </blockquote>
  
  <p>I can see that this is happening because the debugger is making use of luasocket. <code>\ZeroBraneStudio\bin\clibs53\socket\core.dll</code> is dependent on <code>lua53.dll</code>, and is expecting it to contain lua compiled as c.</p>
  
  <p>So, what is the correct solution to this - is it to compile luasocket as c++ as well? </p>
  
  <p>(And, if so, does anybody have instructions/guidance for doing so? I have been unable to find anything on this.)</p>
  
  <p>Thanks.</p>