linkage

Linking against WinNLS

我与影子孤独终老i 提交于 2019-12-25 03:49:14
问题 What static library should I use to link against to use the NormalizeString() function? In contrast with most functions documented on MSDN, the static library required to use the function is not declared. I tried using the name derived from the DLL: normaliz.lib and it successfully linked, but then I get a pop-up at runtime saying Normalization.dll could not be found on my computer and the process is shut down. 回答1: As pointer out by Hans Passant, the correct import library is normaliz.lib .

dynamic binding and dynamic linking

荒凉一梦 提交于 2019-12-25 03:24:24
问题 Quoted from Dynamic Binding C++, dynamic binding is orthogonal to dynamic linking... I was wondering how to understand the meaning of orthogonal"? Is it because compilation of source code into machine code is like going deep, and linkage of various machine codes is like going horizontal, and so they are orthogonal to each other, (static/dynamic) name binding is a concept in compilation static/dynamic linking is a concept in linkage? if in dynamic linking, any involved binding, i.e., any

gnuwin32 libxml2 installation : setting several lib and include directories

江枫思渺然 提交于 2019-12-25 01:53:24
问题 I am now compiling libxml2 on windows 8 using mingw32. I have downloaded from here ftp://xmlsoft.org/libxml2/ and follow the instruction found in the README file. They instruct to configure make using a javascript called configure.js. We can run the script like this: cscript configure.js compiler=msvc prefix=c:\opt include=c:\opt\include lib=c:\opt\lib debug=yes I guess there is a super simple and maybe obvious to this question, but how do I set several lib and include folders ? I tried

Grails XOM linkageerror - SAXParserException

倖福魔咒の 提交于 2019-12-24 16:23:41
问题 Possibly related: Grails - attempting to include HTPPBuilder - Linkage error I'm trying to include XOM in my grails project. How do I know which dependency library I need to exclude? I'm lost here. dependencies { build('xom:xom:1.1') { excludes "xml-apis" } } Error: java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException" at java.lang.Class.getDeclaredMethods0(Native

An executable and a shared library dependent on a same statically linked library

心已入冬 提交于 2019-12-24 05:59:48
问题 Suppose you're developing a shared library libshared.so . And you have a static library libstatic.a with some internal classes and functionality you need. You'd like to link it to your .so like this: g++ -o libshared.so -shared myObj.o -lstatic Also you have an executable.sh which will use your .so and dynamically open it in the runtime dlopen("libshared.so", RTLD_NOW) You know this executable was as well statically linked against libstatic.a (but you're not sure the version of the library is

An executable and a shared library dependent on a same statically linked library

徘徊边缘 提交于 2019-12-24 05:59:07
问题 Suppose you're developing a shared library libshared.so . And you have a static library libstatic.a with some internal classes and functionality you need. You'd like to link it to your .so like this: g++ -o libshared.so -shared myObj.o -lstatic Also you have an executable.sh which will use your .so and dynamically open it in the runtime dlopen("libshared.so", RTLD_NOW) You know this executable was as well statically linked against libstatic.a (but you're not sure the version of the library is

Why do structure definitions have internal linkage?

筅森魡賤 提交于 2019-12-23 15:39:39
问题 (I am talking about C, but it also applies to class templates in C++) In header file, it is a custom to put all the DECLARATIONS, not definitions. However, we usually put structure definitions or class templates in header file as well without actually knowing why we can. This doesn't really make sense because they are definitions as well -- ONE DEFINITION RULE. (Yes, structure definitions and class templates don't cause any storage to set, but you still get "redefinition" error below which

What does “internal linkage” mean?

▼魔方 西西 提交于 2019-12-22 08:41:11
问题 In the standard it says that: When a name has internal linkage , the entity it denotes can be referred to by names from other scopes in the same translation unit. and: A name having namespace scope (3.3.6) has internal linkage if it is the name of — a variable, function or function template that is explicitly declared static; So consider the following code: #include <stdio.h> namespace A { /* a with internal linkage now. Entity denoted by a will be referenced from another scope. This will be

template non type arguments

与世无争的帅哥 提交于 2019-12-22 03:59:12
问题 $14.3.2 - "... A template-argument for a non-type, non-template template-parameter shall be one of: ...a constant expression (5.19) that designates the address of an object with static storage duration and external or internal linkage or a function with external or internal linkage..." In the code shown below, I fail to understand why 'name2' and 'name3' are not allowed as non type template arguments. I am using gcc 4.7.2 on Windows. Both 'name2' and 'name3' are names of array and hence are

undefined reference to c functions in c++ code

左心房为你撑大大i 提交于 2019-12-21 06:25:17
问题 I have a strange problem: the code bellow perfectly compiled. src.cpp: extern "C" { #include "header.h" } void A::Execute() { B::Instance().Reset(ix); c_func(ix);// this is c functions declared in header.h C::Instance().Erase(ix); } But when I comment out the c_funk() I get linkage error in all places where I use c functions from the header.h file. With that minor change: void A::Execute() { B::Instance().Reset(ix); //c_func(ix);// this is c function declared in header.h C::Instance().Erase