Hi Monks,
I've downloaded libcurl for windows but my test script is failed:
use strict;
use warnings;
use Inline 'Config' => BUILD_NOISY => 1, CLEAN_AFTER_BUILD => 0;
use Inline 'C' => 'Config' => libs => '-LC:\Users\Administrator\Downlo
+ads\curl-7.67.0_4-win64-mingw\curl-7.67.0-win64-mingw\lib -lcurl',
inc => '-IC:\Users\Administrator\Downloads\curl-7.
+67.0_4-win64-mingw\curl-7.67.0-win64-mingw\include';
use Inline 'C' => <<'CODE';
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#ifndef WIN32
#include <unistd.h>
#endif
#include <curl/curl.h>
int init(){
CURLM *cm;
curl_global_init(CURL_GLOBAL_WIN32);
return 0;
}
CODE
output:
g++.exe bb_pl_d714.def -o blib\arch\auto\bb_pl_d714\bb_pl_d714.xs.dll
+-mdll -s -L"C:\perl\perl\lib\CORE" -L"C:\perl\c\li
b" bb_pl_d714.o "C:\perl\perl\lib\CORE\libperl530.a" "C:\perl\perl\s
+ite\lib\auto\share\dist\Alien-curl\lib\libcurl.a"
"C:\perl\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\perl\c\x86_64-w64
+-mingw32\lib\libkernel32.a" "C:\perl\c\x86_64-w64-
mingw32\lib\libuser32.a" "C:\perl\c\x86_64-w64-mingw32\lib\libgdi32.a"
+ "C:\perl\c\x86_64-w64-mingw32\lib\libwinspool.a"
"C:\perl\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\perl\c\x86_64-w64
+-mingw32\lib\libadvapi32.a" "C:\perl\c\x86_64-w64-
mingw32\lib\libshell32.a" "C:\perl\c\x86_64-w64-mingw32\lib\libole32.a
+" "C:\perl\c\x86_64-w64-mingw32\lib\liboleaut32.a"
"C:\perl\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\perl\c\x86_64-w6
+4-mingw32\lib\libuuid.a" "C:\perl\c\x86_64-w64-min
gw32\lib\libws2_32.a" "C:\perl\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\
+perl\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\perl
\c\x86_64-w64-mingw32\lib\libversion.a" "C:\perl\c\x86_64-w64-mingw32\
+lib\libodbc32.a" "C:\perl\c\x86_64-w64-mingw32\lib
\libodbccp32.a" "C:\perl\c\x86_64-w64-mingw32\lib\libcomctl32.a" -Wl,-
+-enable-auto-image-base
C:/perl/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w
+64-mingw32/bin/ld.exe: bb_pl_d714.o:bb_pl_d714.c:(
.text+0x6a): undefined reference to `__imp_curl_global_init'
C:/perl/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w
+64-mingw32/bin/ld.exe: bb_pl_d714.o:bb_pl_d714.c:(
.text+0x11b): undefined reference to `__imp_curl_global_init'
collect2.exe: error: ld returned 1 exit status
gmake: *** [Makefile:475: blib\arch\auto\bb_pl_d714\bb_pl_d714.xs.dll]
+ Error 1
A problem was encountered while attempting to compile and install your
+ Inline
C code. The command that failed was:
"gmake" with error code 2
The build directory was:
C:\perl\_Inline\build\bb_pl_d714
To debug the problem, cd to the build directory, and inspect the outpu
+t files.
at bb.pl line 6.
...propagated at C:/perl/perl/site/lib/Inline/C.pm line 888.
BEGIN failed--compilation aborted at bb.pl line 6.
perl -V:
C:\perl>perl -V
Summary of my perl5 (revision 5 version 30 subversion 0) configuration
+:
Platform:
osname=MSWin32
osvers=10.0.17763.529
archname=MSWin32-x64-multi-thread
uname='Win32 strawberry-perl 5.30.0.1 #1 Thu May 23 12:20:46 2019
+x64'
config_args='undef'
hint=recommended
useposix=true
d_sigaction=undef
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=undef
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='gcc'
ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANS
+I_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CO
NTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -m
+ms-bitfields'
optimize='-s -O2'
cppflags='-DWIN32'
ccversion=''
gccversion='8.3.0'
gccosandvers=''
intsize=4
longsize=4
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='long long'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='g++.exe'
ldflags ='-s -L"C:\perl\perl\lib\CORE" -L"C:\perl\c\lib"'
libpth=C:\perl\c\lib C:\perl\c\x86_64-w64-mingw32\lib C:\perl\c\li
+b\gcc\x86_64-w64-mingw32\8.3.0
libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
+ -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi3
2 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl
+32
perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomd
+lg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnet
api32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lco
+mctl32
libc=
so=dll
useshrplib=true
libperl=libperl530.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs
dlext=xs.dll
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags='-mdll -s -L"C:\perl\perl\lib\CORE" -L"C:\perl\c\lib"'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
HAVE_INTERP_INTERN
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at May 23 2019 12:26:54
@INC:
C:/perl/perl/site/lib/MSWin32-x64-multi-thread
C:/perl/perl/site/lib
C:/perl/perl/vendor/lib
C:/perl/perl/lib
Any ideas ? Thanks in advance!