Hi John,

Your idea to add precompiled headers like this does not work. Also 
othere changed you said you made, made no difference.

hook_cpp_binding_header_includes = "#include 
\"general/include/a2dprec.h\"\n..#include \"wxbind/include/wxbind.h\"\n"

I think the only thing that will be correct is to place the next at as 
the first include file in *.cpp generated.
This is what the comment says, and how it worked before.

-------------------------------------------------------------------------------
-- Set any #includes or other C++ code to be placed verbatim at the top of
--   every generated cpp file or "" for none
hook_cpp_binding_includes = "#include \"general/include/a2dprec.h\"\n"

With this setting i get in my lubind.cpp:

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

#ifndef WX_PRECOMP
     #include "wx/wx.h"
#endif

#include "wxlua/include/wxlstate.h"
#include "luawraps/include/luabind.h"
#include "general/include/a2dprec.h"

But i need this, to make it work.

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

#ifndef WX_PRECOMP
     #include "wx/wx.h"
#endif

#include "general/include/a2dprec.h"
#include "wxlua/include/wxlstate.h"
#include "luawraps/include/luabind.h"



If i change in genwxbind.lua in the next function:

function GenerateHookCppFileHeader(fileData)

to this again, all is oke as before, what that be wrong in other situations?
If so we better have and extra variable to contain a precompiled header 
include in the rules file.



function GenerateHookCppFileHeader(fileData)
    table.insert(fileData, "// 
----------------------------------------------------------------------------\n")
    table.insert(fileData, "// This file was generated by genwxbind.lua \n")
    table.insert(fileData, "//\n")
    table.insert(fileData, "// Any changes made to this file may be lost 
when file is regenerated.\n")
    table.insert(fileData, "// 
----------------------------------------------------------------------------\n")
    table.insert(fileData, "\n")
    table.insert(fileData, "#ifdef __BORLANDC__\n")
    table.insert(fileData, "    #pragma hdrstop\n")
    table.insert(fileData, "#endif\n")
    table.insert(fileData, "\n")
    table.insert(fileData, "#ifndef WX_PRECOMP\n")
    table.insert(fileData, "     #include \"wx/wx.h\"\n")
    table.insert(fileData, "#endif\n")
    table.insert(fileData, hook_cpp_binding_includes or "")
    table.insert(fileData, "\n")
    table.insert(fileData, "\n")
    table.insert(fileData, "#include \"wxlua/include/wxlstate.h\"\n\n")
    table.insert(fileData, "\n")

    if includeList then
        for idx = 1, table.getn(includeList) do
            table.insert(fileData, "#include \""..includeList[idx].."\"\n")
        end
    end
    table.insert(fileData, "#include \""..hook_cpp_header_filename.."\"\n")
    table.insert(fileData, "\n")
    table.insert(fileData, "\n\n")

    return fileData
end

Regards,

Klaas









-- 
Unclassified



_______________________________________________
Wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to