last day (14 days later) » 

12:30 PM
0
A: how to pass enum values from TCL script to C++ class using Swig

LeonAccording to the official documentation: C/C++ constants are installed as global Tcl variables containing the appropriate value. So you must refer to the enum value by dereferencing the corresponding variable: % myClass_printEnum $one Some examples of exposing C/C++ enums in Tcl are a ...

 
I tried the same and it is not working . I tried set one "one" ; myClass_printEnum $one . I am getting the same error TypeError in method 'myClass_printEnum', argument 1 of type 'type'
 
global variable one is already set by example.so. Don't set it yourself.
 
is it possible to define enum Type inside class myClass and pass it from TCL for example class myClass { public:
is it possible to define enum Type inside class myClass and pass it from TCL for example class myClass { public: enum Type { one,two} .. } an use it TCL
 
Yes, see the examples here: doc.gnu-darwin.org/enum
 
it working , if I use load ./example.so . but In my actual tool code , the swig code in linked statically and I am getting following error message unknown variable myClass_one . Could you guide me how to solve this ?
 
12:30 PM
@TechEnthusiast And could you explain to me why anyone should help you on stackoverflow given that you don't appreciate their help (since your activity history shows that you haven't accepted any answer to any of your almost 40 questions asked here)?
 
hi
Sorry but I have deep respect for Stack overflow and I have accepted suggestions to all my 40 questions
Could you let me know how you inferred that I did not accept any suggestions
 
12:46 PM
Can u check my history now
 
 
1 hour later…
1:58 PM
?
 
2:11 PM
Did you search for your new problem on stackoverflow?
Try searching with various keywords that describe your problem, for example - swig tcl link statically
Try different keywords and if you cannot find an answer, then post a new question
BTW, I appreciate that you took time to review your old questions and gave credit to the authors of answers that you found useful
I recommend that you go through the stackoverflow tour (stackoverflow.com/tour) which you obviously missed right after signup
 

last day (14 days later) »