Archived
This forum has been archived. Please start a new discussion on GitHub.
Obj-C Mapping
slypete
in Bug Reports
This simple slice module:
Produces this Obj-C method:
Which yields two identical syntax errors:
module Datatypes
{
struct Vector2D
{
double x;
double y;
};
};
Produces this Obj-C method:
-(NSUInteger) hash
{
NSUInteger h_ = 0;
h_ = (h_ << 1) ^ x;
h_ = (h_ << 1) ^ y;
return h_;
}
Which yields two identical syntax errors:
error: invalid operands to binary ^
0
Comments
-
0
-
Hi Benoit,
When I try to build IceTouch after applying the patch:Test.m: In function ‘-[TestOperationsStruct2 hash]’: Test.m:331: error: invalid operands to binary ^ Test.m:332: error: invalid operands to binary ^ make[4]: *** [Test.o] Error 1 make[3]: *** [all] Error 1 make[2]: *** [all] Error 1 make[1]: *** [all] Error 1 make: *** [all] Error 1
I can build the same directory just fine without the patch.
Thanks,
Pete0 -
Hi Pete,
Sorry, I should have mentioned that rebuilding the slice2objc translator is necessary after applying the patch. To rebuild the translator:$ cd IceTouch-0.1.0/cpp $ make
Note that you also need to build and install mcpp (you can use the latest version, 2.7.2) to build the translators. For instructions on how to build mcpp see the INSTALL file at the top-level of your Ice Touch distribution.
Cheers,
Benoit.0
