Questions tagged [linking]
The linking tag has no summary.
34 questions
1
vote
0
answers
117
views
How does pnpm's node_modules structure avoid circular symlinks?
I'm reading this article explaining the node_modules structure of pnpm.
https://pnpm.js.org/en/symlinked-node-modules-structure
It states next to the bolded text avoid circular symlinks that ...
0
votes
4
answers
1k
views
Is it better to use the linker to compile multiple C++ files or better to include them as a header file
Assume we have two files
a.cc
#include <iostream>
int timesTwo(int in);
int main(){
std::cout << timesTwo(5) << std::endl;
return 0;
}
b.cc
int timesTwo(int in){
return in*2;
...
9
votes
2
answers
12k
views
Is it good practice to statically link libstdc++ and/or libgcc when creating distributable binaries for Linux?
Context: I have an open source project which uses JNI. While it's possible to build it yourself, I expect most users will use standard Java tools like Maven, Gradle, or SBT to download the JAR, which ...
6
votes
1
answer
3k
views
What does the 'emulation' do in the Linker?
I am looking into assembler and I am trying to understand the whole compilation process.
During the linking step I use:
ld -m elf_i386 -s -o hello hello.o
Everything works fine, but I do not ...
-1
votes
1
answer
84
views
Creating a "lite" version of shared library on Linux/POSIX in addition to full version
I have a large shared library, a collection of functions created from numerous .a files into libeverything.so. The code for the .a files is obviously compiled with -fPIC. I also have libeverything.a ...
0
votes
2
answers
1k
views
How should I include libraries that I want to statically link against in my repository?
I know how to actually do the linking, but I'm not sure what the best practice is for actually getting those libraries downloaded and into my repository. Should I just straight-out include them using ...
5
votes
4
answers
2k
views
What are the benefits of using meta tag/JavaScript redirection over HTTP header redirection?
Upon inspecting Twitter's URL shortening service http://t.co, I noticed that, instead of redirecting to the goal URL using a Location HTTP header and a 3xx HTTP status code, it redirects using the ...
1
vote
1
answer
214
views
Union wildcard sections in the linker
I'm trying to union many functions so that they will all run in the same small section of ram but be loaded from elsewhere.
I have done this for several sections explicitly with a sections command ...
9
votes
2
answers
482
views
Apollo-11: Using inclusion instead of a linker
Recently digitized and turned into a repo, the original Apollo 11 guidance computer source code has been made available for viewing on Github.
In MAIN.agc, the repo author comments that they
split ...
1
vote
2
answers
415
views
Standard for implementing GUIs for command line utilities
I wrote a command-line utility and I want to develop a GUI for it. I saw that almost every tool on linux comes command-line, and it eventually has a GUI which interacts with the command line utility ...
16
votes
3
answers
4k
views
Should I add the source of libraries instead of linking to them?
I'm relatively new to C++, so I'm not sure how I should best handle small dependencies (e.g., a scripting language, or a JSON/YAML/XML Parser).
Should I create separate projects and link them as ...
3
votes
2
answers
818
views
Why use dynamic linking for less-popular libraries?
I know the difference between static and dynamic linking. I know why the notion of a library is important. And I even know why you'd want to link something like OpenGL, platform-specific APIs, or ...
4
votes
1
answer
1k
views
How would I organize a C project that uses libraries?
First off, I'm relatively new to C - I know the language somewhat, but never looked too much into the whole build process.
From what I'm seeing, if I want to use a third party library and have it in ...
3
votes
3
answers
5k
views
Linking two or more different programming languages
I would like to ask how optimizer software written in C/C++ can be linked to simulator software written in FORTRAN or any other language. I have copied the section of journal article of Singh and ...
10
votes
2
answers
9k
views
Can I distribute a GPL executable (not a library) in a closed-source application? [duplicate]
I want to write a closed-source desktop application that uses a piece of GPL software in the background.
I know that I can't link to a GPL library (libgit.a). But if I embed a GPL application (git....