Trying to compile with vbcc the https.c

3 posts / 0 new
Last post
walkero
walkero's picture
Offline
Last seen: 3 months 2 days ago
Joined: 2009-05-03 16:54
Trying to compile with vbcc the https.c

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.

  1. vc frontend for vbcc (c) in 1995-2016 by Volker Barthelmann
  2. 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__
  3. > BPTR err = ErrorOutput();
  4. warning 161 in line 48 of "https.c": implicit declaration of function <ErrorOutput>
  5. > return(err ? err : Output());
  6. warning 161 in line 50 of "https.c": implicit declaration of function <Output>
  7. > Printf("SSL connection using %s\n", SSL_get_cipher(ssl));
  8. warning 161 in line 119 of "https.c": implicit declaration of function <Printf>
  9. > FPrintf(GetStdErr(), "Warning: couldn't read subject name in certificat
  10. warning 161 in line 134 of "https.c": implicit declaration of function <FPrintf>
  11. > FWrite(Output(), buffer, ssl_err, 1);
  12. warning 161 in line 157 of "https.c": implicit declaration of function <FWrite>
  13. > FFlush(Output());
  14. warning 161 in line 159 of "https.c": implicit declaration of function <FFlush>
  15. > CloseSocket(sock);
  16. warning 161 in line 181 of "https.c": implicit declaration of function <CloseSocket>
  17. > if (!(SocketBase = OpenLibrary("bsdsocket.library", 4)))
  18. warning 161 in line 215 of "https.c": implicit declaration of function <OpenLibrary>
  19. > if (!(SocketBase = OpenLibrary("bsdsocket.library", 4)))
  20. error 39 in line 215 of "https.c": invalid types for assignment
  21. > else if (!(ISocket = (struct SocketIFace *)GetInterface(SocketBase, "main", 1,
  22. warning 161 in line 218 of "https.c": implicit declaration of function <GetInterface>
  23. > AMISSLMASTER_MIN_VERSION)))
  24. error 39 in line 222 of "https.c": invalid types for assignment
  25. > else if (!InitAmiSSLMaster(AMISSL_CURRENT_VERSION, TRUE))
  26. warning 161 in line 230 of "https.c": implicit declaration of function <InitAmiSSLMaster>
  27. > else if (!(AmiSSLBase = OpenAmiSSL()))
  28. warning 161 in line 232 of "https.c": implicit declaration of function <OpenAmiSSL>
  29. > else if (!(AmiSSLBase = OpenAmiSSL()))
  30. error 39 in line 232 of "https.c": invalid types for assignment
  31. > TAG_DONE) != 0)
  32. warning 161 in line 242 of "https.c": implicit declaration of function <InitAmiSSL>
  33. > CleanupAmiSSL(TAG_DONE);
  34. warning 161 in line 265 of "https.c": implicit declaration of function <CleanupAmiSSL>
  35. > DropInterface((struct Interface *)IAmiSSL);
  36. warning 161 in line 266 of "https.c": implicit declaration of function <DropInterface>
  37. > CloseAmiSSL();
  38. warning 161 in line 273 of "https.c": implicit declaration of function <CloseAmiSSL>
  39. > CloseLibrary(AmiSSLMasterBase);
  40. warning 161 in line 282 of "https.c": implicit declaration of function <CloseLibrary>
  41. > if ((sock = socket(AF_INET, SOCK_STREAM, 0)) >= 0)
  42. warning 161 in line 306 of "https.c": implicit declaration of function <socket>
  43. > addr.sin_addr.s_addr = inet_addr(proxy);
  44. warning 161 in line 313 of "https.c": implicit declaration of function <inet_addr>
  45. > if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) >= 0)
  46. warning 161 in line 322 of "https.c": implicit declaration of function <connect>
  47. > if (send(sock, buffer, strlen(buffer), 0) >= 0)
  48. warning 161 in line 340 of "https.c": implicit declaration of function <send>
  49. > if ((len = recv(sock, buffer, sizeof(buffer) - 1, 0)) >= 0)
  50. warning 161 in line 347 of "https.c": implicit declaration of function <recv>
  51. 3 errors found!
  52. 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?

salass00
salass00's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-02-03 11:27
Re: Trying to compile with vbcc the https.c

Add "-D__USE_INLINE__" to the compiler options.

walkero
walkero's picture
Offline
Last seen: 3 months 2 days ago
Joined: 2009-05-03 16:54
Re: Trying to compile with vbcc the https.c

@salass00
Thank you for your reply. That worked really nice.

Log in or register to post comments