قبلا از راهکار ارایه شده در این لینک جواب گرفتم :
http://stackoverflow.com/questions/58058/using-c-classes-in-so-libraries