You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Bjørn Ruff <br...@forstware.de> on 2022/07/15 09:11:32 UTC

Building dll for Win32

Hello,

can someone tell me how?

I am using Microsoft Visual C++ 2022.

I tried in build directory

cmake -G "Visual Studio 16 2019 Win32" 
-DCMAKE_INSTALL_PREFIX=c:\externLibs\xerces \externLibs\xerces-c-3.2.3\src

and

cmake -G "Visual Studio 17 2022 Win32" 
-DCMAKE_INSTALL_PREFIX=c:\externLibs\xerces \externLibs\xerces-c-3.2.3\src

and

cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/externLibs/xerces 
-DCMAKE_BUILD_TYPE=Release -Dnetwork-accessor=curl 
\externLibs\xerces-c-3.2.3\src

All without success.

Best regards,
Björn Ruff
Forstware Informationssysteme
Von Lassbergstr. 35
D 88709 Meersburg

RE: Building dll for Win32

Posted by Roger Leigh <rl...@codelibre.net>.
Hi Bjørn,

There are several ways of doing this. Here's an example from within CLion:

C:\Users\rleigh\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-1\221.5921.27\bin\cmake\win\bin\cmake.exe -G "Visual Studio 17 2022" -S C:\Users\rleigh\code\xerces-c -B C:\Users\rleigh\code\xerces-c\cmake-build-debug-basic
-- Configuring Apache Xerces-C++ version 3.3.0
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
-- The C compiler identification is MSVC 19.32.31329.0
-- The CXX compiler identification is MSVC 19.32.31329.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX_FLAG_W3
-- Performing Test CXX_FLAG_W3 - Success
...
--   Message Loader:            inmemory
--   XMLCh type:                char16_t
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/rleigh/code/xerces-c/cmake-build-debug-basic

You can do it directly from a shell or script like this as well:

rleigh@sorilea MINGW64 ~/code/xerces-c/testbuild (XERCESC-2205_std_thread)
$ cmake -G "Visual Studio 17 2022" -B . -S ..
-- Configuring Apache Xerces-C++ version 3.3.0
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
-- The C compiler identification is MSVC 19.32.31329.0
-- The CXX compiler identification is MSVC 19.32.31329.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual St
...
--   Message Loader:            inmemory
--   XMLCh type:                char16_t
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/rleigh/code/xerces-c/testbuild

Hope that helps.  I configured with no additional options here, it's just using all of the defaults.


Kind regards,
Roger

> -----Original Message-----
> From: Bjørn Ruff <br...@forstware.de>
> Sent: 15 July 2022 10:12
> To: c-users@xerces.apache.org
> Subject: Building dll for Win32
> 
> Hello,
> 
> can someone tell me how?
> 
> I am using Microsoft Visual C++ 2022.
> 
> I tried in build directory
> 
> cmake -G "Visual Studio 16 2019 Win32"
> -DCMAKE_INSTALL_PREFIX=c:\externLibs\xerces \externLibs\xerces-c-
> 3.2.3\src
> 
> and
> 
> cmake -G "Visual Studio 17 2022 Win32"
> -DCMAKE_INSTALL_PREFIX=c:\externLibs\xerces \externLibs\xerces-c-
> 3.2.3\src
> 
> and
> 
> cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/externLibs/xerces
> -DCMAKE_BUILD_TYPE=Release -Dnetwork-accessor=curl \externLibs\xerces-
> c-3.2.3\src
> 
> All without success.
> 
> Best regards,
> Björn Ruff
> Forstware Informationssysteme
> Von Lassbergstr. 35
> D 88709 Meersburg