Problem with SWIG under 64-bit arch

[email protected] (menth0l)
Newsgroups perl.xs
Organization http://groups.google.com
Message-ID <1c5d7003-7ead-4ebd-ad6f-e2cdddd8e353@e14g2000yqe.googlegroups.com>
Hi,

I wrote a small module with C++ for computing similiarity between
strings. I compiled it on my 32-bit Windows XP machine using MinGW and
SWIG and got a .dll file. It worked like a charm.

Now i need to make it work in Windows 2003 x86_64 envinronment. I
downloaded 64-bit version of MinGW and reproduced exactly the same
steps from 32-bit env, namely:

I have 3 files: Leventsthein.cpp, Levensthein.h (algorithm
implementation) and UtilsXS.cpp (this only exports single function
that uses Levensthein class). Now then:

> swig -perl5 -c++ UtilsXS.cpp
Now i have UtilsXS_wrap.cxx, and UtilsXS.pm
> g++ -c UtilsXS_wrap.cxx Levensthein.cpp -Ic:\perl64\lib\CORE
> g++ -shared UtilsXS_wrap.o Levensthein.o c:\perl64\lib\CORE\perl510.lib -o UtilsXS.dll

This compiles and links without errors. But when i try to import it in
my .pl file script immediately exits with no messages whatsoever. When
i run it with:
> perl -d test.pl

Signal SEGV at UtilsXS.pm line 11
        require UtilsXS.pm called at dupa.pl line 2
        main::BEGIN() called at UtilsXS.pm line 0
        eval {...} called at UtilsXS.pm line 0

Note that this does not happen on my 32-bit envinronment. What could
be the cause? If it helps: i use ActiveState perl v5.10 on both
envinronments.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.