static-linking

QT https SSL support for static QT static program build - getting 'Protocol “https” is unknown'

和自甴很熟 提交于 2019-11-29 16:06:56
Hi I am trying to compile a QT program I made for Windows statically and keep getting the error Protocol "https" is unknown when running an update database function that uses https in the address that the update function uses. It works when run through QT Creator as I have openssl installed however apparently the static executable doesn't have the proper libraries to do https. I did find this and this . I looked all over the net trying to find a solution but couldn't. Here's what I've done so far: edited the powershell script here to include the parameter -openssl-linked for configure.bat

Link static library using CMake

孤者浪人 提交于 2019-11-29 15:02:19
I cannot get the library ${static_library} to statically link using CMake. I have tried hard coding the path and as far as I'm aware TARGET_LINK_LIBRARIES should link this in automatically. ADD_LIBRARY(libraryA STATIC ${source_files}) TARGET_LINK_LIBRARIES(libraryA debug ${static_library}) There is a sub project that links libraryA later in the build ADD_EXECUTABLE(testA ${test_sources}) TARGET_LINK_LIBRARIES(testA libraryA) which has ${static_library} correctly linked in but I need ${static_library} to be directly linked into libraryA . ComicSansMS You cannot link libraries into libraries

Can I link MSVCRT statically with mingw?

℡╲_俬逩灬. 提交于 2019-11-29 14:55:10
问题 I have C program I compile with mingw on Windows. It works fine but requires MSVCRT.DLL . I want to link that statically (like I can do in Visual Studio). Is this possible? I tried -static flag to gcc and it didn't make any change. What about C++ program using also standard C++ library? 回答1: I believe that MinGW doesn't use the static runtime library for copyright reasons. You can maybe try to use newlib (http://sourceware.org/newlib/) to create an executable that doesn't link to msvcrt.dll

Static build of QtWebEngine dependent application

让人想犯罪 __ 提交于 2019-11-29 14:35:12
I have an application (audio player for http://vk.com ) which uses OAuth 2.0 authorization. What i did was that i implemented QtWebEngineView object and used it to open an authorization page. Basically, it looks like currently i'm using quite a big class for such a little job. Anyway, i need to make a static build of my application — unfortunately, from my researches i've discovered people saying that making a static build of QtWebEngine-dependent application is not possible for some reasons. Is this true? If so, are there any alternatives — maybe some classes made for OAuth 2.0 authentication

Is it possible to statically link against a shared object?

荒凉一梦 提交于 2019-11-29 14:13:30
My question is not the same as this question . I'm working on a project with a standalone binary that has no dynamic/external linkage, and runs in a *nix environment. I'm attempting to move to a newer toolset to build with, but some of the static libraries that are available with the older toolset aren't available now -- for example, the crt libraries that provided _start aren't provided in this toolset. I've been digging through the files provided with the vendor's toolset and found some shared objects with the symbols I needed from the crt libraries (eg, _start, _fini , etc) but I'm unsure

Static link libstdc++ using clang

僤鯓⒐⒋嵵緔 提交于 2019-11-29 12:43:03
问题 When I use GCC, I can build program on my Ubuntu 15.04 using this: -static-libgcc -static-libstdc++ And compiled binary can run on "stock" Ubuntu 14.04 without any external packages, only standard updates. Is there possibility do build with this static linking to library with clang ? Most common answers: using test ubuntu rep ( ppa:ubuntu-toolchain-r/test ) update server recompile on target server don't use GCC is not suitable for me. Just can I do this with clang for run it on Ubuntu 14.04.3

gcc - A static library with undefined symbols?

隐身守侯 提交于 2019-11-29 12:36:36
问题 I'm trying to build a project using a static library, so that the binary can be used even if the library isn't installed. However, I get lots of errors about undefined symbols when I try to do so. Looking at the library, I see it has tons of undefined symbols, even though it's a .a static lib: nm - u /usr/local/lib/libthis.a .... U EVP_DigestFinal_ex U EVP_DigestInit_ex U EVP_DigestUpdate U EVP_MD_CTX_cleanup U EVP_MD_CTX_init Those seem to be from openssl; others seem to be from libbzip2;

How to use static linking with OpenSSL in C/C++

那年仲夏 提交于 2019-11-29 12:22:56
问题 I wrote simple apps with Openssl in C and C++. I compile them like this: gcc openssltest.c -o openssltest -lcrypto g++ openssltest.cpp -o openssltest -lcrypto And its all ok but only, when you have Openssl installed. I would like to compile it that I can run them on OS where theres no Openssl installend (linux-like OS). I tried this: gcc -c openssltest.c -lcrypto -static gcc openssltest.o -o openssltest -lcrypto -static and same for C++: g++ -c openssltest.cpp -lcrypto -static g++ openssltest

In visual studio how to include all .libs in a folder

徘徊边缘 提交于 2019-11-29 12:05:06
问题 I am trying to build a project with another project. There are a lot of libs in there and I am not sure where the required unreferenced symbols are present. Is there a way I can include all the .lib files while compiling? I have given the lib directory as an additional input to the linker, yet it asks for individual .lib files to be included. Is there an option to say include all .lib s in this folder? 回答1: bigD's answer is right. The place you would actually do this, in VS 2012 at least, is

making gcc prefer static libs to shared objects when linking?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 11:36:26
问题 When linking against libraries using the -l option (say -lfoo ), gcc will prefer a shared object to a static library if both are found (will prefer libfoo.so to libfoo.a ). Is there a way to make gcc prefer the static library, if both are found? The issue I'm trying to solve is the following: I'm creating a plugin for an application (the flight simulator called X-Plane), with the following constraints: the plugin is to be in the form of a 32 bit shared object, even when running on a 64 bit