[cable] Problem with static method

Anton Deguet anton at cs.jhu.edu
Fri Apr 18 13:06:04 EDT 2003


Hum,

I tried to rename string to stdstring to avoid any conflict with any Tcl 
  keyword.  I still have the same problem and it seems logical to me 
because:

- in my first e-mail, I was trying without wrapping std::string

- as I wrote in my second e-mail (the previous one), I tested the same 
code using "int" instead of "short" and it worked (to test, see my 
previous e-mail and in myClass.h, try #define MY_TYPE short).

So, any clue?  Could it be a Tcl or gcc version problem?

Anton



Brad King wrote:
> Hi Anton,
> 
> I think your problems may be caused by this:
> 
>   namespace wrappers
>   {
>     typedef std::string string;
>     typedef myClass myClass;
>   }
> 
> You are using "string" as the name of the "std::string" class in Tcl.
> Tcl reserves the "string" command as one of its standard commands.  Try
> renaming it to "stdstring" or something else.
>


-- 
Anton Deguet - Email anton<at>cs.jhu.edu
Office NEB B26 - Phone 410 516 5261 - Fax 410 516 3332
http://cisstweb.cs.jhu.edu




More information about the cable mailing list