static-linking

Force CMake to use static libraries

邮差的信 提交于 2019-12-30 18:49:06
问题 [Shamelessly cross-posted from the CMake help list] I'm trying to create binaries as statically as possible. The fortran code I've got has got X11 and quadmath as dependencies, and I've come across a number of issues (maybe each of these issues should be in a different question?): My variables are currently set(CMAKE_LIBRARY_PATH /usr/X11/lib /usr/X11/include/X11 ${CMAKE_LIBRARY_PATH}) find_package(X11 REQUIRED) find_library(X11 NAMES X11.a PATHS /usr/X11/include/X11/ /usr/X11/lib) find

VS2010: Link in a single library statically

断了今生、忘了曾经 提交于 2019-12-30 06:01:52
问题 Situation: I'm building a library with VS2010, and it has a dependency on LibraryA. I am only using one of many features that LibraryA offers, so I want to link it in statically. Everything I'm reading about this tells me to set the whole project to link statically against MFC, which is something I don't want to do. I'm just fine with my library dynamically linking against windows DLLs; I just want to statically link against LibraryA only. Fooling around with the options windows, I don't seem

Static build of QtWebEngine dependent application

耗尽温柔 提交于 2019-12-29 08:51:38
问题 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.

dyld: Library not loaded: /opt/local/lib/libglib-2.0.0.dylib

落花浮王杯 提交于 2019-12-25 13:18:33
问题 I've gotten MDB-Tools compiled for OSX, but when I try to run a sample command line program on another computer I get this error: dyld: Library not loaded: /opt/local/lib/libglib-2.0.0.dylib Referenced from: /Users/dev/mdb/mdb-test Reason: image not found Trace/BPT trap: 5 I believe that this means that the target system is missing a library and I think its something to do with linkage, but I'm not exactly positive how to go about fixing this. Could anyone point me in the right direction? 回答1

dyld: Library not loaded: /opt/local/lib/libglib-2.0.0.dylib

早过忘川 提交于 2019-12-25 13:18:04
问题 I've gotten MDB-Tools compiled for OSX, but when I try to run a sample command line program on another computer I get this error: dyld: Library not loaded: /opt/local/lib/libglib-2.0.0.dylib Referenced from: /Users/dev/mdb/mdb-test Reason: image not found Trace/BPT trap: 5 I believe that this means that the target system is missing a library and I think its something to do with linkage, but I'm not exactly positive how to go about fixing this. Could anyone point me in the right direction? 回答1

The enums does not get passed to TCL when we have SWIG TCL Static Linking

白昼怎懂夜的黑 提交于 2019-12-25 08:01:33
问题 In continuation to question how to pass enum values from TCL script to C++ class using Swig I have following code 1) File : example.i %module example %{ /* Put header files here or function declarations like below */ #include "example.h" %} %include "example.h" 2 File example.h class myClass { public: enum Type {one,two}; myClass() {} static bool printVal(int val); static bool printEnum(Type val); }; 3) File example.cpp #include "example.h" #include <iostream> using namespace std; bool

Link object to subject in RDF domain

非 Y 不嫁゛ 提交于 2019-12-25 07:33:20
问题 I have this RDF file: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:j.0="http://relation/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <rdf:Description rdf:about="soggetto"> <j.0:Nome>Vercelli</j.0:Nome> <j.0:Regione>Piemonte</j.0:Regione> </rdf:Description> <rdf:Description rdf:about="Piemonte"> <rdfs:label>Piemonte</rdfs:label> </rdf:Description> <rdf:Description rdf:about="Regione"> <rdfs:label>Regione</rdfs:label> <rdf:type rdf:resource="http://www.w3.org

VLC Api with C++ - linker error for .lib (even when I've added it to my VC++ project)

守給你的承諾、 提交于 2019-12-25 07:01:11
问题 I wanted to compile the sample C++ program that uses VLC Api, according to the https://wiki.videolan.org/LibVLC_Tutorial/, with my Visual Studio 2012 on Windows 7 x64 (I work with x86 anyway). In order to obtain a .lib file, I've followed: https://wiki.videolan.org/GenerateLibFromDll/. I had some problems at the start, but finally I got (I've noticed the warnings): And I do have my libvlc.lib created. I've moved it to the folder with my main.cpp , added the path to Project -> VC++ Directories

Getting last file access time using BasicFileAttributes in Java SDK 1.8

牧云@^-^@ 提交于 2019-12-25 05:15:19
问题 I have seen most of the previous questions here on Java 1.7 and getting the last file access time. Here's also a good snippet on import library and how they get the last file access time: http://kodejava.org/how-do-i-get-file-basic-attributes/ I did this: BasicFileAttributes attrs = Files.readAttributes(file, BasicFileAttributes.class); FileTime time = attrs.lastAccessTime(); However, in my IntelliJ IDEA IDE it says, BasicFileAttributes could not be resolved. So, I imported this: import java

clang - linking a static library with a pch file causes error with __STATIC__ disabled

狂风中的少年 提交于 2019-12-25 04:15:59
问题 Am currently trying to link a bunch of Objective C modules into a static library. I am getting the following error and am unable to locate any information on how the __STATIC__ can not be disabled when building a PCH file. error: __STATIC__ predefined macro (as opposed to __DYNAMIC__) was disabled in PCH file but is currently enabled The command to build the PCH file is: clang -cc1 -target-cpu x86-64 -g -fno-validate-pch -emit-pch -x objective-c-header afile.pch -o afile.pch.bin -O0 -fmath