I am trying to compile with vbcc the example code https.c, but I am getting errors. I am using a cross compiling environment, with AmigaOS 4 SDK and latest AmiSSL 4.4 dev files installed.
I am using the following command to compile it:
vc +aosppc +newlib -I/opt/sdk/ppc-amigaos/Include/include_h -I/opt/sdk/ppc-amigaos/Include/netinclude -I/opt/sdk/ppc-amigaos/newlib/include -I/opt/sdk/AmiSSL/include -lauto https.c -o https -v
I get a few errors and a lot of warnings. I think that I am missing something.
vc frontend for vbcc (c) in 1995-2016 by Volker Barthelmann vbccppc -quiet "https.c" -o= "/tmp/file3LINRb.asm" -I/opt/sdk/ppc-amigaos/Include/include_h -I/opt/sdk/ppc-amigaos/Include/netinclude -I/opt/sdk/ppc-amigaos/newlib/include -I/opt/sdk/AmiSSL/include -elf -no-regnames -no-multiple-ccs -madd -c99 -use-commons -O=1 -I$VBCC/targets/ppc-amigaos/include -D__amigaos4__ > BPTR err = ErrorOutput(); warning 161 in line 48 of "https.c": implicit declaration of function <ErrorOutput> > return(err ? err : Output()); warning 161 in line 50 of "https.c": implicit declaration of function <Output> > Printf("SSL connection using %s\n", SSL_get_cipher(ssl)); warning 161 in line 119 of "https.c": implicit declaration of function <Printf> > FPrintf(GetStdErr(), "Warning: couldn't read subject name in certificat warning 161 in line 134 of "https.c": implicit declaration of function <FPrintf> > FWrite(Output(), buffer, ssl_err, 1); warning 161 in line 157 of "https.c": implicit declaration of function <FWrite> > FFlush(Output()); warning 161 in line 159 of "https.c": implicit declaration of function <FFlush> > CloseSocket(sock); warning 161 in line 181 of "https.c": implicit declaration of function <CloseSocket> > if (!(SocketBase = OpenLibrary("bsdsocket.library", 4))) warning 161 in line 215 of "https.c": implicit declaration of function <OpenLibrary> > if (!(SocketBase = OpenLibrary("bsdsocket.library", 4))) error 39 in line 215 of "https.c": invalid types for assignment > else if (!(ISocket = (struct SocketIFace *)GetInterface(SocketBase, "main", 1, warning 161 in line 218 of "https.c": implicit declaration of function <GetInterface> > AMISSLMASTER_MIN_VERSION))) error 39 in line 222 of "https.c": invalid types for assignment > else if (!InitAmiSSLMaster(AMISSL_CURRENT_VERSION, TRUE)) warning 161 in line 230 of "https.c": implicit declaration of function <InitAmiSSLMaster> > else if (!(AmiSSLBase = OpenAmiSSL())) warning 161 in line 232 of "https.c": implicit declaration of function <OpenAmiSSL> > else if (!(AmiSSLBase = OpenAmiSSL())) error 39 in line 232 of "https.c": invalid types for assignment > TAG_DONE) != 0) warning 161 in line 242 of "https.c": implicit declaration of function <InitAmiSSL> > CleanupAmiSSL(TAG_DONE); warning 161 in line 265 of "https.c": implicit declaration of function <CleanupAmiSSL> > DropInterface((struct Interface *)IAmiSSL); warning 161 in line 266 of "https.c": implicit declaration of function <DropInterface> > CloseAmiSSL(); warning 161 in line 273 of "https.c": implicit declaration of function <CloseAmiSSL> > CloseLibrary(AmiSSLMasterBase); warning 161 in line 282 of "https.c": implicit declaration of function <CloseLibrary> > if ((sock = socket(AF_INET, SOCK_STREAM, 0)) >= 0) warning 161 in line 306 of "https.c": implicit declaration of function <socket> > addr.sin_addr.s_addr = inet_addr(proxy); warning 161 in line 313 of "https.c": implicit declaration of function <inet_addr> > if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) >= 0) warning 161 in line 322 of "https.c": implicit declaration of function <connect> > if (send(sock, buffer, strlen(buffer), 0) >= 0) warning 161 in line 340 of "https.c": implicit declaration of function <send> > if ((len = recv(sock, buffer, sizeof(buffer) - 1, 0)) >= 0) warning 161 in line 347 of "https.c": implicit declaration of function <recv> 3 errors found! vbccppc -quiet "https.c" -o= "/tmp/file3LINRb.asm" -I/opt/sdk/ppc-amigaos/Include/include_h -I/opt/sdk/ppc-amigaos/Include/netinclude -I/opt/sdk/ppc-amigaos/newlib/include -I/opt/sdk/AmiSSL/include -elf -no-regnames -no-multiple-ccs -madd -c99 -use-commons -O=1 -I$VBCC/targets/ppc-amigaos/include -D__amigaos4__ failed
I tried to use PosixLib as well, but no luck.
Any idea what I am missing there?
Add "-D__USE_INLINE__" to the compiler options.
@salass00
Thank you for your reply. That worked really nice.