Angus Robertson 577 Posted October 21 SVN now has much improved C++ packages for Delphi 10.4 and later, although they should work with earlier versions by manually adding a specific compiler suffix. All C++ Win32 packages build and install for release, bugs need fixing for debug and Win64. Will be in the overnight zip tomorrow, if any C++ users wants to try to install them. I tried to build some C++ samples, but they are looking for .h files we now have .hpp, and that is beyond my zero C++ skills. Angus Share this post Link to post
w0wbagger 3 Posted October 21 Thanks, Angus. I'll give 'em a try this week. Share this post Link to post
w0wbagger 3 Posted November 23 Angus, I tried building and installing the C++ Win32 Release packages, and it didn't work at all. Were you using build groups, or did you build/install them separately? I'm currently completely uninstalling my 12.2 installation and reinstalling from scratch to eliminate that as the issue. Thanks, Ian Share this post Link to post
w0wbagger 3 Posted November 23 Okay! I reinstalled 12.2, and built the entire release group after removing the 64-bit compiles, and it worked! Installed my other component sets and while attempting to compile our app, got the same errors with the overnight that HTMLValidator did. [bcc32c Error] OverbyteIcsTypes.hpp(74): unknown type name '_TRANSMIT_FILE_BUFFERS' [bcc32c Error] OverbyteIcsTypes.hpp(76): unknown type name '_TRANSMIT_FILE_BUFFERS' [bcc32c Error] OverbyteIcsTypes.hpp(78): unknown type name 'ip_mreq' [bcc32c Error] OverbyteIcsTypes.hpp(80): unknown type name 'ip_mreq' [bcc32c Error] OverbyteIcsTypes.hpp(94): unknown type name 'sockaddr_in6' [bcc32c Error] OverbyteIcsTypes.hpp(96): unknown type name 'sockaddr_in6' [bcc32c Error] OverbyteIcsTypes.hpp(98): unknown type name 'ipv6_mreq' [bcc32c Error] OverbyteIcsTypes.hpp(100): unknown type name 'PIPV6_MREQ' [bcc32c Error] OverbyteIcsUtils.hpp(624): unknown type name 'sockaddr_in6' [bcc32c Error] OverbyteIcsUtils.hpp(624): expected unqualified-id These did *not* show up when compiling the components, only when attempting to use them in my app. I did as he said: Quote Well, after playing around, I added these two lines to OverbyteIcsTypes.hpp (after '#include <System.SysUtils.hpp>') and it worked! #include <mswsock.h> #include <ws2ipdef.h> and it seems to have worked - it's at least compiling my app with no errors. If there's a way to get Delphi to create the .hpp file with those two lines, then this should fix the issue for anyone else. It's not the 64-bit version I'd love to get working, but at least this might mean we can start developing on 12.2. Thank you, Angus! I *think* it might have been set to use the classic bcc32 compiler, and the dynamic RTL, so I may need to recompile the whole thing with the modern compiler and static libs, but hopefully it will still work. 1 Share this post Link to post
FPiette 385 Posted November 23 15 minutes ago, w0wbagger said: If there's a way to get Delphi to create the .hpp file with those two lines, There is a way ! The $HPPEMIT directive should do the job. Try to add those lines somewhere near the top of the OverbyteIcsTypes.pas file: {$HPPEMIT '#include <mswsock.h>'} {$HPPEMIT '#include <ws2ipdef.h>'} Share this post Link to post
w0wbagger 3 Posted November 23 Thanks, François! The only other thing I had to change in my app (that was using 8.70 prior to this) was to change my check of FtpClient->State from Overbyteicsftpcli::ftpReady to TFtpState::ftpReady in a couple of places. Haven't tried my app yet, but am hoping it will work - it seems to be compiling fine. Will let it finish compiling overnight and test it in the morning. 1 Share this post Link to post
Angus Robertson 577 Posted November 23 I'll update the types unit with the new include emits shortly. I can only build C++ packages not use them, since the ICS C++ samples are too old to build with modern compilers, it really needs someone to update two or three C++ samples so I can test that they build with new versions of ICS. The C++ Win64 packages build with release for me, but not debug, someone will need to look at that. The common package builds for Win64x, but not the run package which imports conmon, because currently D12.2 can only import Delphi packages and not C++ due to missing symbol files, due to fixed in a future release. Angus Share this post Link to post
w0wbagger 3 Posted November 23 (edited) Angus, my app seems to be working fine with the 32-bit release build. Other than the emits and the backwards compatibility issue with having to change overbyteicsftpcli::ftpRead to TFtpState::ftpReady, I've tested the modules that use the ICScomponents and they're working. Thank you for all your work on this. I'll try to see based on your release builds if I can build a debug group and build with the modern C++ 32-bit compiler. At minimum, the modern 32-bit compiler should be the default builder in the options, I'd imagine. I didn't realize D12.2 can't import C++ packages. So that Embarcadero video from yesterday saying the modern 64-bit toolchain "just works" wasn't *quite* accurate. Which would be the simplest C++ samples to update, do you think, Angus? I can maybe take a crack at one or two, at least. Update: I spoke too soon. *Most* of it seems to work, but same code, doing an httpPOST is resulting in an error from the destination ("Premature end of file."). Will check to see what's changed from 8.7 - 9.3 that I need to accommodate. It's almost like it isn't transmitting the entire XML stream that I've queued up. Maybe something to do with the new way that TRestParams work in 9.x? In my old code, I was setting client->SendStream = myTStringStream->get() before calling client->RestRequest. Can I still do that in 9.x? Edited November 23 by w0wbagger 1 Share this post Link to post
w0wbagger 3 Posted November 23 It appears that creating a TStringStream from my postData and setting client->SendStream to this may have worked in the past (8.7), but now I just needed to directly set rawParams = postData, and it worked. Hope I'm doing it correctly now. Share this post Link to post
Angus Robertson 577 Posted November 24 Packages and programs only have one Win32 option, no idea how you select the tool chain. In terms of samples, the obvious ones OverbyteIcsHttpsTst.cbproj, OverbyteIcsWebServ.cbproj, OverbyteIcsCliDemo.cbproj, would be a good start to check applications build. Angus Share this post Link to post