Schrift
Wiki:Tipp zum Debugging: use Data::Dumper; local $Data::Dumper::Useqq = 1; print Dumper \@var;
[thread]11118[/thread]

Windows XS Erweiterung MinGW

Leser: 2


<< >> 3 Einträge, 1 Seite
Ted
 2008-01-09 16:42
#104543 #104543
User since
2008-01-09
22 Artikel
BenutzerIn
[default_avatar]
Hallo,

ich versuche momentan eine einfache XS Erweiterung unter Windows zum laufen zu bringen.

Dazu habe ich das folgende Tutorial verwendet.
Tutorial
Unter Linux funktioniert das ganze einwandfrei, nur Windows will nicht.

Ich habe dabei wie beschrieben die Datei Mytest.xs angepasst.
Dann perl Makefile.PL ausgeführt.

F:\Perl\Mytest>perl Makefile.PL
Set up gcc environment - 3.4.2 (mingw-special)
Checking if your kit is complete...
Looks good
Writing Makefile for Mytest

Bei nmake wird aber ein Fehler erzeugt.
F:\Perl\Mytest>nmake
cp lib/Mytest.pm blib\lib\Mytest.pm
E:\Perl\bin\perl.exe E:\Perl\lib\ExtUtils\xsubpp -typemap E:\Perl\lib\E
xtUtils\typemap Mytest.xs > Mytest.xsc && E:\Perl\bin\perl.exe -MExtUtils::Comm
and -e mv Mytest.xsc Mytest.c
Please specify prototyping behavior for Mytest.xs (see perlxs manual)
gcc -c -I. -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -
DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -D
USE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVE
RSION=\"0.01\" -DXS_VERSION=\"0.01\" "-IE:\Perl\lib\CORE" Mytest.c
Running Mkbootstrap for Mytest ()
E:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Mytest.bs
E:\Perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"My
test\", 'DLBASE' => 'Mytest', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' =>
{ }, 'DL_VARS' => []);"
Set up gcc environment - 3.4.2 (mingw-special)
dlltool --def Mytest.def --output-exp dll.exp
g++ -o blib\arch\auto\Mytest\Mytest.dll -Wl,--base-file -Wl,dll.base -md
ll -L"E:\Perl\lib\CORE" Mytest.obj -Wl,--image-base,0x3e0d0000 E:\Perl\lib\CORE
\perl58.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell
32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc3
2 -lodbccp32 -lmsvcrt dll.exp
g++: Mytest.obj: No such file or directory
NMAKE : fatal error U1077: 'E:\WINNT\system32\cmd.exe' : return code '0x1'
Stop.

Die Fehlermeldung besagt folgendes, wobei mir das nicht wirklich weiterhilft:
NMAKE Fatal Error U1077
Error Message

The given command or program called by NMAKE failed and returned the given exit code.

To suppress this error and continue the NMAKE session, use the /I option, the .IGNORE dot directive, or the dash (-) command modifier. To continue the NMAKE session for unrelated parts of the dependency tree, use the /K option.


Vielleicht weiß ja jemand eine Lösung.

MfG
murphy
 2008-01-10 05:10
#104566 #104566
User since
2004-07-19
1776 Artikel
HausmeisterIn
[Homepage]
user image
Als Anregung zur Fehlersuche fällt mir folgendes auf:

1) Es ist etwas merkwürdig, dass der C-Code mit gcc kompiliert und dann mit g++ gelinkt wird.

2) Normalerweise spuckt der GCC auch unter Windooof beim Kompilieren eine .o-Datei aus, das Linkerkommando erwartet aber eine .obj-Datei.

Wenn Herumbasteln am Makefile keine Option ist hilft eventuell der Workaround erst make auszuführen, dann copy Mytest.o Mytest.obj und dann nochmal make.
When C++ is your hammer, every problem looks like your thumb.
Ted
 2008-01-10 14:46
#104567 #104567
User since
2008-01-09
22 Artikel
BenutzerIn
[default_avatar]
Hallo,

konnte das Problem nicht direkt lösen, bin aber nach einigem Suchen bei vanilla Perl gelandet. Dort ist MinGw und dmake schon dabei und es klappte auf Anhieb.

Trotzdem danke für die Tips.

MfG
<< >> 3 Einträge, 1 Seite



View all threads created 2008-01-09 16:42.