All Questions
Tagged with static-libraries visual-c++
152
questions
0
votes
0
answers
28
views
Hiding non-exported symbols in static libraries on Windows
I have a set of C files that are compiled and linked into a library. If I create a normal dynamic library (.so, .dylib or .dll) I can make sure only those functions marked as EXPORTED are visible to ...
0
votes
0
answers
23
views
How to Build libQGLViewer as a Static Library (.lib) for MSVC in a Qt Project
I need help building libQGLViewer as a static library (.lib) instead of a DLL.
Context:
Project Setup: I'm working on a Qt project and we are migrating from MinGW to MSVC.
Qt Version: 5.15.2
Compiler:...
2
votes
1
answer
210
views
CGO can't import static lib c++ on window 10
I have problem with import custom static lib c++ on window 10.
My custom library use function c++ on Window (AtlCom.h, UIAutomation.h ) so I need use Visual Code to build them.
I build dynamic ...
0
votes
0
answers
30
views
Linking Static libconfig Library to Example Program using CMake in Visual Studio [duplicate]
I am attempting to compile an example program using a static library libconfig++_d.lib with CMake in Visual Studio 2019.
I was able to properly build and link my example program using CMake. However, ...
0
votes
1
answer
537
views
How to bundle a static library with an import library (or two static libraries) with lib.exe?
Import libraries for DLLs on Windows are a peculiar thing. They donate the glue necessary for the linker to create import stubs in the resulting PE file (be it named .dll or .exe or whatever else).
...
1
vote
0
answers
468
views
Use Library Dependency Inputs as a cl compiler option/flag msvc++
So I am building my c++ project from the command line (just quicker for me to develop in) by doing "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat&...
2
votes
0
answers
55
views
Can Visual C++ output a static link tree?
I have a project that links to a fairly large number of both static (.lib) and dynamic libraries (.dll), and many of those libraries include other libraries etc.
We've just found a problem where a ...
0
votes
0
answers
119
views
Why visual studio lib.exe shows same DLL name multiple times when run on *.lib file?
While trying to use lib.exe as below, it always shows same DLL name multiple times. This is with every lib i have run it with.
What does it signify?
C:\Program Files (x86)\Windows Kits\10\Lib\10.0....
1
vote
1
answer
152
views
How do I stop a C++ program from calling a function body from the wrong source file, when it's defined in 2 places? [duplicate]
I've tried creating a static library with two copies of the same function, defined in two seperate header/source files.
These 2 source files should be mutually exclusive and not includable within the ...
0
votes
0
answers
22
views
msvc & cmake fully link static library with other static libraries (bundle) [duplicate]
I' am currently attempting to build my own small graphical library that also uses imgui internally and want to distribute this single static library (/MT for release and /MTd for dbg).
How would I ...
0
votes
0
answers
368
views
Why does VS not generate a .lib file if there is no .cpp file?
I am trying to create a simple 2D library, consisting entirely of class templates. I created an empty project, changed configuration type to static library, and then added my header files. It ...
0
votes
2
answers
273
views
Can I include an existing static library in my own static library project?
I am creating a static library project in visual studio for personal use, and I'd like to include another existing static library into my own static library.
Usually (for executible projects) I can ...
0
votes
1
answer
876
views
Forcing static linkage using CMake on Windows
I want to compile my code into a single standalone EXE without any DLLs on Windows.
My CMakeLists.txt looks as follows:
cmake_minimum_required(VERSION 3.18)
set(TARGET_NAME "...
0
votes
0
answers
58
views
Library file some ten times larger than the executable even though all functions are being used
I have been working on making some libraries for a while, and I have a testing system where I'll have one solution per library, with one project building the library and another project testing and ...
1
vote
1
answer
4k
views
Visual Studio - static library won't link
I created a static library (designated A) in Visual Studio that includes some header files from another library (designated B). Because that is a static library I didn't need to worry about the .lib ...