Latest SWIG 2.0.4.
- Frank

On 18/08/2011 1:27 PM, Thomas Paviot wrote:
You're right, there maybe a #define SWIG 1 somewhere or something like that. Which SWIG version do you use?

Thomas

2011/8/18 Frank Conradie <fr...@qfin.net <mailto:fr...@qfin.net>>

    Hi Thomas

    It looks like the "SWIG" string in Visualization.i is replaced by
    "1", because if I change the path to something else, and copy
    ExceptionCatcher.i there, it works - possibly a macro substitution
    type of thing?

    - Frank


    On 18/08/2011 12:50 PM, Thomas Paviot wrote:
    2011/8/18 Frank Conradie <fr...@qfin.net <mailto:fr...@qfin.net>>

        Hi Thomas

        I made some progress on this in the last hour or so:

        1. sys.platform is still "win32", even for 64 bit Python.


    Funny!


        2. The sys.maxint check does not work on Windows - it returns
        the 32 bit max, even though I am definitely using Python 2.6
        64bit.


    I didn't know about that. I thought the maxint was 2^63-1 when
    python is compiled in 64bit mode.

        I have found other references to this on some messageboards.
        The suggested way to work around this is to check the 1st
        value returned by "platform.architecture()", which returns
        ('64bit', 'WindowsPE').


    Very interesting, I will move to this function. I tested that it
    returns '32bit' for OSX/python2.5 and '64bit' for OSX/python2.6.
    Thanks.


        3. To link with the 64bit versions of the OCC libs, I made
        this change:
            if sys.platform=='win32':
                OCC_LIB = os.path.join(OCC_ROOT,'win%d'%bits,'lib')


    Ok. This has to be properly handled.


        4. I added the 64 bit flags, as you also suggested in your email:
            if bits==64:
                DEFINE_MACROS.append(('_OCC64',None))
                SWIG_OPTS.append('-D_OCC64')

        However, I currently get this error:

        C:\Python\pythonocc-0.5\src\wrapper\Visualization\Visualization.i(25)
        : Error: Unable to find '..\1\ExceptionCatcher.i'
        error: command 'swig.exe' failed with exit status 1


    Strange, line 25 of Visualization.i should be:
    %include ../SWIG/ExceptionCatcher.i





        Any idea where this could stem from?


    Absolutely not. What about the other modules?


        - Frank


    Thomas


        On 18/08/2011 12:12 PM, Thomas Paviot wrote:
        2011/8/18 Frank Conradie <fr...@qfin.net
        <mailto:fr...@qfin.net>>

            I am wondering if anyone has tried to build pythonocc
            for 64bit Python on Win64? Looking at environment.py.
            there is no special case code for 64 bit builds on
            Windows yet, although there is for Linux and MacOS.

            - Frank


        Hi Frank,

        There's not any Win64 specific code because I did not have
        the opportunity to have a Win64 machine to test pythonocc
        with this platform. However I do think that the 64bit code
        for linux/darwin could be used as is for Win64.

        The script environment.py first detects whether or not
        python is 64 bit (by querying sys.maxint). After that,
        according to the result (32 or 64bit), environment.py
        decides to set -D_OCC64 as a compiler define. That's all. If
        you just append ('_OCC64',None) to the DEFINE_MACROS list,
        you should have pythonocc compiled properly under Win64.

        Just a question: under Win32, sys.platform returns the
        'win32' string. Is 'win64' returned under win64?

        I will create a branch named tp/win64-support (don't know if
        you're familiar with git). I will notify you when it's done
        so that you can test building pythonocc from github
        (https://github.com/tpaviot/pythonocc). I don't know if
        there are speficic things to be aware of when dealing with
        python and windows in 64 bit mode, feel free to send any
        suggestion.

        Best Regards,

        Thomas



        _______________________________________________
        Pythonocc-users mailing list
        Pythonocc-users@gna.org  <mailto:Pythonocc-users@gna.org>
        https://mail.gna.org/listinfo/pythonocc-users

        _______________________________________________
        Pythonocc-users mailing list
        Pythonocc-users@gna.org <mailto:Pythonocc-users@gna.org>
        https://mail.gna.org/listinfo/pythonocc-users




    _______________________________________________
    Pythonocc-users mailing list
    Pythonocc-users@gna.org  <mailto:Pythonocc-users@gna.org>
    https://mail.gna.org/listinfo/pythonocc-users

    _______________________________________________
    Pythonocc-users mailing list
    Pythonocc-users@gna.org <mailto:Pythonocc-users@gna.org>
    https://mail.gna.org/listinfo/pythonocc-users




_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to