Beschreibe hier die neue Seite. |
wenn ich mal zeit und lust hab werd ich mir swig bezüglich perl weiter ansehn vielleicht schreibt mir's ja wer andrer fertig... 3. compiling using MakeMaker? Makefile.PL [[Code] use ExtUtils?::MakeMaker?; WriteMakefile?( 'NAME' => 'ccode', 'OBJECT' => 'ccode.o ccode_wrap.o' ); perl Makefile.PL make ] manual way: [[Code] 3. compiling (+ figuring out the configuration of perl) [[Code] # perl -e 'use Config; print $Config{ccflags};' -{D REENTRANT}? -{D GNU SOURCE}? -{DTHREADS HAVE PIDS}? -DDEBIAN -fno-strict-aliasing -I/ usr/local/include -{D LARGEFILE SOURCE}? -{D FILE OFFSET BITS}?=64 ] [[Code] gcc -{D REENTRANT}? -{D GNU SOURCE}? -{DTHREADS HAVE PIDS}? -DDEBIAN -fno-strict-aliasing -I/usr/local/include -{D LARGEFILE SOURCE}? -{D FILE OFFSET BITS}?=64 -c sample.c sa mple_wrap.c -I /usr/lib/perl/5.8.4/CORE ] creates: sample.o sample_wrap.o 4. linking [[Code] ld -G sample.o sample_wrap.o -o sample.so ] 5. installation [[Code] cp sample.so /usr/local/lib/perl/5.8.4 cp sample.pm /usr/local/lib/perl/5.8.4 ] ] 6. testing [[Code] perl <<EOF > use sample; > samplec::printtext; > EOF hello world |
3. compiling using MakeMaker?
Makefile.PL
![]() |
|
manual way:
![]() |
|
6. testing [[Code] perl <<EOF > use sample; > samplec::printtext; > EOF hello world