BASIC Developer & Support Resources > Scripting Languages

cURL Windows

<< < (2/9) > >>

AIR:
Are you using MinGW to build on Windows (I don't remember)?

If so, I think if you add these two flags to your CFLAGS for the Curl module, it should enable the Windows native ssl support, eliminating the need for OpenSSL:

-DUSE_WINDOWS_SSPI
-DUSE_SCHANNEL

You might also need to change the init call, not sure.  Check the Curl documentation....

AIR.

John:
I'm using TDM-GCC-32 latest 9.2 I think. I'm using your MAKE (slightly modified) for SB you created. I now create two SB versions. SBC for console and SBW for GUI based programs. Both support Windows styles and themes.

Getting cURL HTTPS to work on Windows has been a challenge.

I will give your suggestions a try and see if I can get it going.

John:
Here is the make file I have been using. I just downloaded the cURL source but lost how to get this compiled. Any direction or guidance would be appreciated.


--- Code: C ---all : bin\mod\lib\curl.a bin\mod\dll\curl.dll   bin\mod\lib\curl.a : bin\mod\obj\curl\s_interface.o         ar -r ..\..\bin\mod\lib\curl.a ..\..\bin\mod\obj\curl\s_interface.o bin\mod\dll\curl.dll : bin\mod\obj\curl\interface.o         gcc -Wno-write-strings -static-libgcc -pipe -shared -w -s -O2 -m32 -Wl,--add-stdcall-alias,--output-def,"..\..\bin\mod\dll\curl_imp.def",--out-implib,"..\..\bin\mod\dll\curl_imp.a" -s -o ..\..\bin\mod\dll\curl.dll ..\..\bin\mod\obj\curl\interface.o -lm -lpthread -lcurl bin\mod\obj\curl\interface.o : interface.c         gcc -w -D_WIN32 -m32 -c -o ..\..\bin\mod\obj\curl\interface.o interface.c bin\mod\obj\curl\s_interface.o : interface.c         gcc -w -D_WIN32 -DSTATIC_LINK=1 -m32 -c -o ..\..\bin\mod\obj\curl\s_interface.o interface.c  

John:
I was able to get HTTPS working on Windows using these old files. I have no idea where the source is.  The LIBCURL.DLL is in the bin directory.

Your RSS code challenge on Windows works with these files.

I'm going to download the binary form (DLL) of LIBCURL and compile against it. I think that is how what works was built. What I have must be trying to create a standalone extension module.



John:
AIR,

I got everything setup with the latest libcurl libraries and include. This is the errors I'm getting trying to build the extension module. I have seen this before but I forget what you had me do to fix it.


--- Code: Bash ---C:\sbgcc\source\extensions\curl>mingw32-make -B -f Makefilegcc -w -D_WIN32 -DSTATIC_LINK=1 -m32 -c -o ..\..\bin\mod\obj\curl\s_interface.o interface.cIn file included from interface.c:27:../../basext.h:837:41: error: static declaration of '_init' follows non-static declaration  837 | #define besSUB_PROCESS_START static int _init(){      |                                         ^~~~~interface.c:2214:1: note: in expansion of macro 'besSUB_PROCESS_START' 2214 | besSUB_PROCESS_START      | ^~~~~~~~~~~~~~~~~~~~../../basext.h:978:7: note: previous declaration of '_init' was here  978 |   int _init(void);\      |       ^~~~~interface.c:2212:1: note: in expansion of macro 'besDLL_MAIN' 2212 | besDLL_MAIN      | ^~~~~~~~~~~../../basext.h:843:42: error: static declaration of '_fini' follows non-static declaration  843 | #define besSUB_PROCESS_FINISH static int _fini(){      |                                          ^~~~~interface.c:2219:1: note: in expansion of macro 'besSUB_PROCESS_FINISH' 2219 | besSUB_PROCESS_FINISH      | ^~~~~~~~~~~~~~~~~~~~~../../basext.h:979:7: note: previous declaration of '_fini' was here  979 |   int _fini(void);\      |       ^~~~~interface.c:2212:1: note: in expansion of macro 'besDLL_MAIN' 2212 | besDLL_MAIN      | ^~~~~~~~~~~Makefile:14: recipe for target 'bin\mod\obj\curl\s_interface.o' failedmingw32-make: *** [bin\mod\obj\curl\s_interface.o] Error 1 C:\sbgcc\source\extensions\curl> 

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version