Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!NNBYKo3BvwFAUbh1iP+wmQ.user.gioia.aioe.org.POSTED!not-for-mail From: Boris Dorestand Newsgroups: comp.lang.c++ Subject: Re: [OT] Re: how to compile the bulk copy program Date: Sat, 08 May 2021 07:46:27 -0300 Organization: Aioe.org NNTP Server Lines: 61 Message-ID: <86fsyx4i64.fsf@example.com> References: <86sg2y42pz.fsf@example.com> NNTP-Posting-Host: NNBYKo3BvwFAUbh1iP+wmQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:amRuCuoFla9PzKfXx4q6UXj7zvM= Xref: csiph.com comp.lang.c++:79457 Paavo Helde writes: > 08.05.2021 01:07 Boris Dorestand kirjutas: >> I'm trying to compile Pavel's bulk copy program >> https://github.com/zodiacon/Win10SysProgBookSamples/tree/master/Chapter11/BulkCopy >> Not a C++ programmer, nor a Windows person. I wonder if the context >> is >> on-topic. I also don't know which group would be more appropriate. >> With the WTL latest version obtained from >> https://wtl.sourceforge.io/ >> I get some compiler errors. I then tried to use the previous >> version of >> WTL, which dates back to 2015. I get other error messages. >> I suppose my problem is having either the wrong compiler or the >> wrong >> headers. Any directions you point me to will be useful. Thank you. >> (/) WTL 10, year 2020 >> ``c:\sys\emacs\usr\win\tmp\Win10SysProgBookSamples\Chapter11\BulkCopy>cl >> MainDlg.cpp >> Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x86 >> Copyright (C) Microsoft Corporation. All rights reserved. >> MainDlg.cpp >> MainDlg.cpp(33): error C2664: 'int >> WTL::CListViewCtrlT::InsertColumn(int,LPCTSTR,int,int,int,int,int)': >> cannot convert argument 2 from 'const wchar_t [7]' to 'LPCTSTR' >> MainDlg.cpp(33): note: Types pointed to are unrelated; conversion >> requires reinterpret_cast, C-style cast or function-style cast`` >> [...] > > (Only answering here because I do not participate in any Windows > specific groups/forums). Thank you. I don't know any NNTP-based programming Microsoft group. If anyone does know, please recommend me. I do have access to gmane.io's NNTP server, that is, a mail list would probably work too. > You normally cannot really call cl.exe with a single .cpp and with no > other arguments. In correct usage it has dozens of command line > arguments, and you do not call cl.exe directly, but rather an IDE like > Visual Studio does that, based on a project file which defines those > dozens of arguments. Thank you. That pointed me in the right direction. I managed to compile it using msbuild.exe. The program nuget.exe downloaded the libraries to the current directory and, inspecting BulkCopy.vcxproj, I could see the place for them were ..\packages\: --8<---------------cut here---------------start------------->8--- --8<---------------cut here---------------end--------------->8--- > From the error messages it looks like at least /D_UNICODE and/or > /DUNICODE are missing, but fixing this won't probably help you > much. You should rather follow the build instructions provided by the > original program. If there is a .vcxproj or a .sln file, most probably > you are expected to open that in Visual Studio and build it there. You're right. It did use /D _UNICODE and /D UNICODE.