Problems in java wrappers when iniitalizing static const variables in C++.. pleeez help!!!

View: New views
1 Messages — Rating Filter:   Alert me  

Problems in java wrappers when iniitalizing static const variables in C++.. pleeez help!!!

by Dwarak123 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I'm new to swig and I'm trying to create Java wrappers for my existing C++ code....
However whenever I initialize any static const variable inside any class....I get errors when compilng the equivalent Java class.....
For eg: if my c++ class looks somewhat like this:

namespace CommonGPS{

class MessageBase {
 static const uint8_t headerSize = 8;
  ......
  .....
};

} // namespace ends

then the java class looks like this:

public class MessageBase {
......
......
public final static short headerSize = CommonGPS:MessageBase::headerSize;
}

I don't want this. and this also gives the following compile errors:
MessageBase.java:72: ';' expected
  public final static short headerSize = CommonGPS::MessageBase::headerSize;
                                                  ^
MessageBase.java:72: <identifier> expected
  public final static short headerSize = CommonGPS::MessageBase::headerSize;
                                                               ^
MessageBase.java:72: <identifier> expected
  public final static short headerSize = CommonGPS::MessageBase::headerSize;

Somebody pleeez help me!!! Should I add something in the swig interface file to aviod this??


Thanks
Dwarak
                                                                           ^

 



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user