#1349 C#/director generation error (2.0.11)



We evaluate swig-2.0.11 and noticed one problem with generation of C# directors for some classes. we generate C#-code in Linux and then try to compile under VS2008. Version 2.0.1 didn't have this issue. Please see description of the issue below:

The function swig_connect_director generated by swig-2.0.9 contains duplicate names for different parameters, which breaks compilation. For example

search for:


in declaration below:

void swig_connect_director(SWIG_Callback0_t callbackConnect__SWIG_0, SWIG_Callback1_t callbackConnect__SWIG_1, SWIG_Callback2_t callbackDisconnect, SWIG_Callback3_t callbackReconnect, SWIG_Callback4_t callbackAddClient, SWIG_Callback5_t callbackRemoveClient, SWIG_Callback6_t callbackGetFd, SWIG_Callback7_t callbackCheckSocket, SWIG_Callback8_t callbackDispatchEvents, SWIG_Callback9_t callbackLoop__SWIG_0, SWIG_Callback10_t callbackLoop__SWIG_1, SWIG_Callback11_t callbackLoop__SWIG_2, SWIG_Callback12_t callbackLoop__SWIG_3, SWIG_Callback13_t callbackStopCheck, SWIG_Callback14_t callbackSendLogon, SWIG_Callback15_t callbackWriteBlock, SWIG_Callback16_t callbackGetDescription, SWIG_Callback17_t callbackOnConnect, SWIG_Callback18_t callbackOnConnectionClose, SWIG_Callback19_t callbackNew_ConnObj__SWIG_0, SWIG_Callback20_t callbackNew_ConnObj__SWIG_1, SWIG_Callback21_t callbackConnect__SWIG_0, SWIG_Callback22_t callbackConnect__SWIG_1);

You will find 2 entries. This code will never compile. There is some array in 20 elements for callback variable names or something. Please help us to resolve the issue.

See attached 2 h-classes and swig interface file that you can use to generate h-file and reproduce the issue. You don't have to compile the C++ code the error is visible in director declaration.

Thank you,
Yuriy Khodak.

1 Attachments


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks