Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong binaries on Windows #340

Open
Thomas1664 opened this issue Apr 12, 2022 · 2 comments
Open

Wrong binaries on Windows #340

Thomas1664 opened this issue Apr 12, 2022 · 2 comments

Comments

@Thomas1664
Copy link

On Windows I get the following binaries after Build:

/bin/manual-link/checkDynamic.dll
/bin/manual-link/checkDynamic.pdb
/debug/bin/checkDynamic.dll
/debug/bin/checkDynamic.pdb
/debug/lib/check.lib
/debug/lib/checkDynamic.lib
/debug/lib/manual-link/compat.lib
/lib/check.lib
/lib/checkDynamic.lib
/lib/compat.lib

2 Questions:
What is compat.lib for?

Why checkDynamic.lib?
This is installed even if I'm only building a static library. The way I understand this it is only used for linking into the DLL. In this case, this is most likely wrong.

@agrandville
Copy link

Hi @Thomas1664, third party lib compat is no more necessary 02783ad
When I build this project,

D:\dev\check\tmp32>cmake .. -G "Visual Studio 16 2019" -A Win32 -DCMAKE_INSTALL_PREFIX="D:/dev/check/out32.dbg"
..lot of output...
D:\dev\check\tmp32>cmake --build . --target install
..lot of output...

I get this files.
imho there is no flag to disable the dynamic library build

D:\dev\check\out32.dbg
+---bin
|       checkDynamic.dll
|       checkmk
|
+---include
|       check.h
|       check_stdint.h
|
+---lib
|   |   check.lib
|   |   checkDynamic.lib
|   |
|   +---cmake
|   |   \---check
|   |           check-config-version.cmake
|   |           check-config.cmake
|   |           check-targets-debug.cmake
|   |           check-targets.cmake
|   |
|   \---pkgconfig
|           check.pc
|
\---share
    \---man
        +---man1
        |       checkmk.1
        |
        +---man3
        |       suite_create.3
        |
        \---man7
                libcheck.7

@Thomas1664
Copy link
Author

Hi @agrandville,

first of all, sorry for the late response.

imho there is no flag to disable the dynamic library build

You can set BUILD_SHARED_LIBS to OFF. See the CMake documentation. This requires to remove STATIC and SHARED from calls to add_library.

Hi @Thomas1664, third party lib compat is no more necessary 02783ad

This is a general question: What is libcompat and where to get its sources from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants