Questions tagged [dynamic-loading]

Mechanism for a computer program to load a library (or other binary) into memory at runtime. Allows retrieving addresses of functions and variables contained in the library, executing functions, accessing variables, and unloading library from memory.

378 questions
87
votes
5 answers

What exactly does `-rdynamic` do and when exactly is it needed?

What exactly does -rdynamic (or --export-dynamic at the linker level) do and how does it relate to symbol visibility as defined by the -fvisibility* flags or visibility pragmas and __attribute__s? For --export-dynamic, ld(1) mentions: ... If you…
Petr Skocik
  • 58,047
  • 6
  • 95
  • 142
77
votes
3 answers

How do I programmatically compile and instantiate a Java class?

I have the class name stored in a property file. I know that the classes store will implement IDynamicLoad. How do I instantiate the class dynamically? Right now I have Properties foo = new Properties(); foo.load(new FileInputStream(new…
unj2
  • 52,135
  • 87
  • 247
  • 375
75
votes
1 answer

Difference between System.load() and System.loadLibrary in Java

What is the difference between System.load() and System.loadLibrary() in java? I want to load a library but I don't want to add the path to environment variables. Will any one of these help?
javaMan
  • 6,352
  • 20
  • 67
  • 94
54
votes
3 answers

dynamic listview adding "Load more items" at the end of scroll

I have a listview which is fetching data from sqlite database by Json. I want to turn it into dynamic listview that at the end of scroll, a "load more items" appears in the footer of the list while loading more items and adding them to the adapter…
Namikaze Minato
  • 1,332
  • 4
  • 23
  • 41
24
votes
2 answers

GHC API - How to dynamically load Haskell code from a compiled module using GHC 7.2?

I have an existing Haskell function that uses the GHC API to dynamically load compiled code from a module. It is based on the code from the blog post Dynamic Compilation and Loading of Modules in Haskell. The code works fine in GHC 7.0, but had to…
Justin Ethier
  • 131,333
  • 52
  • 229
  • 284
23
votes
5 answers

How to specify (non-R) library path for dynamic library loading in R?

I keep getting the following error when attempting to install readxl or haven in R (both dependencies of tidyverse) post-compilation, when the installer runs the loading test: ** testing if installed package can be loaded Error in dyn.load(file,…
merv
  • 67,214
  • 13
  • 180
  • 245
21
votes
1 answer

Dynamic loading and weak symbol resolution

Analyzing this question I found out some things about behavior of weak symbol resolution in the context of dynamic loading (dlopen) on Linux. Now I'm looking for the specifications governing this. Let's take an example. Suppose there is a program a…
MvG
  • 57,380
  • 22
  • 148
  • 276
19
votes
5 answers

Alternatives to dlsym() and dlopen() in C++

I have an application a part of which uses shared libraries. These libraries are linked at compile time. At Runtime the loader expects the shared object to be in the LD_LIBRARY_PATH , if not found the entire application crashes with error "unable…
sud03r
  • 19,109
  • 16
  • 77
  • 96
18
votes
2 answers

Help with Haskell dynamic plugin load

I'm a Haskell beginner, and I'm trying to use the dynamic loading in the 'plugins' package. I'm kind of lost. Here is a minimal program with two files. Main.hs: module Main (main) where import System.Plugins main :: IO () main = do putStrLn…
Rob N
  • 15,024
  • 17
  • 92
  • 165
18
votes
1 answer

Dynamic loading under GHCi

I need to be able to load Haskell modules dynamicaally, and evaluate expressions in the context of dynamically-loaded modules. Hint does it; the problem is, it doesn't work under GHCi, on Windows at least. cygwin-bash> ghci HintTest.hs GHCi, version…
n. m. could be an AI
  • 112,515
  • 14
  • 128
  • 243
16
votes
4 answers

Building a Plugin Architecture with Adobe AIR

I'm thinking of choosing Adobe AIR as the client-side implementation technology for an upcoming project. (The previous choice was C# and WPF, but I've been really impressed with Flash/Flex/AIR lately.) But one of the most important features of my…
benjismith
  • 16,559
  • 9
  • 57
  • 80
15
votes
1 answer

How does module loading work in CPython?

How does module loading work in CPython under the hood? Especially, how does the dynamic loading of extensions written in C work? Where can I learn about this? I find the source code itself rather overwhelming. I can see that trusty ol' dlopen() and…
Praxeolitic
  • 22,455
  • 16
  • 75
  • 126
15
votes
1 answer

Maintain scrollTop while inserting new sections above the current viewed elements (without glitching)

Here's one for the real JQuery UI geniuses: We have a extremely long form with sections loaded on demand (e.g. when an index/navigation is clicked, or as we scroll near the edges of the current section). When I load sections below the currently…
iCollect.it Ltd
  • 92,391
  • 25
  • 181
  • 202
15
votes
1 answer

Function pointer equality in C

My questions: Is function pointer equality guaranteed by the C standard? If the answer of (1) is yes. Is that the case regardless of the pointer being obtained in different final compilation units (e.g. main executable and a shared library)? How…
fons
  • 4,905
  • 4
  • 29
  • 49
14
votes
1 answer

Effect of LoaderOptimizationAttribute

I have written a small piece of code regarding the dynamic loading of assemblies and creating class instances from those assemblies, including an executable, a test lib to be dynamically loaded and a loader library to load dynamic assembly into a…
ali_bahoo
  • 4,732
  • 6
  • 41
  • 63
1
2 3
25 26