Hi John,

Is there a way to wrap the objects mentioned below in several wrap files?
The actual wrapping of the class is in one of them.
If this is not so simple, i will make a unique *.i file just for this class.
But it looks more like a general issue, so maybe it can be solved more 
elegantly.

Thanks,

Klaas

I need to wrap many of my command id's/items in headers available as:

extern const a2dMenuIdItem CmdMenu_ChangeCanvasObjectStyle;
extern const a2dMenuIdItem CmdMenu_ChangeCentralStyle;

Now as you say in binding docs, that needs to be done with %define_object between %class a2dMenuIdItem and %endclass, but i can not combine them with the class wrap/definition itself.

My a2dMenuIdItem are spread across several modules as follows, and that gives linking problems:

In file docview.i:

%class %noclassinfo %delete a2dMenuIdItem

    %define_object CmdMenu_Exit;
    %define_object CmdMenu_FileClose;

--  and all methods etc. of the a2dMenuIdItem class

%endclass

In file canvas.i:

%class %noclassinfo %delete a2dMenuIdItem
    %define_object CmdMenu_ChangeCanvasObjectStyle;
    %define_object CmdMenu_ChangeCentralStyle;
%endclass

In file editor.i:

%class %noclassinfo %delete a2dMenuIdItem
    %define_object CmdMenu_PopTool;
    %define_object CmdMenu_InsertGroupRef;
%endclass


Generating the binding gives warnings:

1>canvas.obj : warning LNK4006: "int wxluatype_a2dMenuIdItem" (?wxluatype_a2dMenuIdItem@@3HA) already defined in editor.obj; second definition ignored 1>canvas.obj : warning LNK4006: "struct wxLuaBindMethod * a2dMenuIdItem_methods" (?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already defined in editor.obj; second definition ignored 1>canvas.obj : warning LNK4006: "int a2dMenuIdItem_methodCount" (?a2dMenuIdItem_methodCount@@3HA) already defined in editor.obj; second definition ignored 1>docview.obj : warning LNK4006: "int wxluatype_a2dMenuIdItem" (?wxluatype_a2dMenuIdItem@@3HA) already defined in editor.obj; second definition ignored 1>docview.obj : warning LNK4006: "struct wxLuaBindMethod * a2dMenuIdItem_methods" (?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already defined in editor.obj; second definition ignored 1>docview.obj : warning LNK4006: "int a2dMenuIdItem_methodCount" (?a2dMenuIdItem_methodCount@@3HA) already defined in editor.obj; second definition ignored

BUT when linking the library to the application i get errors:

1>    Searching ..\..\..\lib\Debug\wxart2d_msw28d_luawraps.lib:
1>wxart2d_msw28d_luawraps.lib(docview.obj) : error LNK2005: "int wxluatype_a2dMenuIdItem" (?wxluatype_a2dMenuIdItem@@3HA) already defined in wxart2d_msw28d_luawraps.lib(canvas.obj) 1>wxart2d_msw28d_luawraps.lib(docview.obj) : error LNK2005: "struct wxLuaBindMethod * a2dMenuIdItem_methods" (?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already defined in wxart2d_msw28d_luawraps.lib(canvas.obj) 1>wxart2d_msw28d_luawraps.lib(docview.obj) : error LNK2005: "int a2dMenuIdItem_methodCount" (?a2dMenuIdItem_methodCount@@3HA) already defined in wxart2d_msw28d_luawraps.lib(canvas.obj) 1>wxart2d_msw28d_luawraps.lib(editor.obj) : error LNK2005: "int wxluatype_a2dMenuIdItem" (?wxluatype_a2dMenuIdItem@@3HA) already defined in wxart2d_msw28d_luawraps.lib(canvas.obj) 1>wxart2d_msw28d_luawraps.lib(editor.obj) : error LNK2005: "struct wxLuaBindMethod * a2dMenuIdItem_methods" (?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already defined in wxart2d_msw28d_luawraps.lib(canvas.obj) 1>wxart2d_msw28d_luawraps.lib(editor.obj) : error LNK2005: "int a2dMenuIdItem_methodCount" (?a2dMenuIdItem_methodCount@@3HA) already defined in wxart2d_msw28d_luawraps.lib(canvas.obj)

--
Unclassified


------------------------------------------------------------------------------------------------------------
Disclaimer:

If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------

<<attachment: db348.vcf>>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to