Patch #1 for Ice Touch 0.1.0 - invalid generated code for structs

benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
Hi,

The patch below fixes invalid generated code for structs containing float or double members.

To apply the patch:
   $ cd IceTouch-0.1.0
   $ patch -p1 < patch.txt

Cheers,
Benoit.

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Note that after applying this patch, you will need to rebuild the slice2objc translator.

    To rebuild the translator:
     $ cd IceTouch-0.1.0/cpp
     $ make
    

    You need to have mcpp installed, see the INSTALL file from the top-level directory of your Ice Touch distribution for instructions on how to build mcpp (you can use the latest mcpp 2.7.2 version).

    Cheers,
    Benoit.
  • Frank BroylesFrank Broyles Member Frank BroylesOrganization: WSUVProject: loc-based mobile game
    i cannot get it to find mcpp tho i installed it with macports.
    the build is trying to access -lmcpp but as far as i can see
    mcpp is in bin, not lib. i've tried setting the mcpp location in Make.rules.
    i've also tried install mcpp thru the link in ice downlaods. but still no luck.
    thanks in advance for help.
    error message follows:
    c++ -O2 -DNDEBUG -ftemplate-depth-128 -Wall -D_REENTRANT -L../../lib -o ../../bin/slice2cpp Gen.o Main.o -lSlice -L/usr/local/lib -lmcpp -lIceUtil -lpthread
    ld: library not found for -lmcpp
    collect2: ld returned 1 exit status
    make[2]: *** [../../bin/slice2cpp] Error 1
    make[1]: *** [all] Error 1
    make: *** [all] Error 1
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Frank,

    It sounds like the mcpp build from MacPorts doesn't include the mcpp library in the lib directory. The best is to download mcpp from mcpp -- a portable C preprocessor with Validation Suite and compile it yourself. You can configure it with the following command to build a static library:
      $ ./configure CFLAGS=-fno-common --enable-mcpplib --disable-shared
      (and --prefix=<dir> if you like)
    

    Cheers,
    Benoit.
Sign In or Register to comment.