On Tuesday, 27 December 2016 at 18:12:42 UTC, Mike Wey wrote:
dmd will need to pass "--export-dynamic" to the linker, so that
the symbol is actually exported.
Thanks, at least one useful answer out of nine!
On Tuesday, 27 December 2016 at 00:05:39 UTC, Andrei Alexandrescu
wrote:
./test: undefined symbol: fun
I'm building with no flags using dmd. What could be the problem
here?
Importing symbols from your executable requires to tell the
linker to create a dynamic symbol table, i.e. using
On 12/27/2016 06:02 AM, Adam D. Ruppe wrote:
On Tuesday, 27 December 2016 at 00:05:39 UTC, Andrei Alexandrescu wrote:
I'm building with no flags using dmd.
Do dmd -v for verbose output and see what linker flags it is doing.
Perhaps you have a configuration difference that is causing it not to
It works on my Ubuntu 16.04 and dmd v2.071.1
But it wants to call dlopen() as core.sys.posix.dlfcn.dlopen().
On 2016-12-27 01:05, Andrei Alexandrescu wrote:
Consider this code:
===
import core.sys.posix.dlfcn;
extern(C) void fun() {}
void main()
{
fun();
void *hndl = dlopen(null, RTLD_LAZY);
if (!hndl) assert(0);
auto p = dlsym(hndl, "fun".ptr);
if (!p)
{
import
On Mon, 26 Dec 2016 19:05:39 -0500, Andrei Alexandrescu wrote:
> I'm building with no flags using dmd. What could be the problem here?
What DMD version are you using?
On 2016-12-27 01:05, Andrei Alexandrescu wrote:
Consider this code:
===
import core.sys.posix.dlfcn;
extern(C) void fun() {}
void main()
{
fun();
void *hndl = dlopen(null, RTLD_LAZY);
if (!hndl) assert(0);
auto p = dlsym(hndl, "fun".ptr);
if (!p)
{
import
On Tuesday, 27 December 2016 at 00:05:39 UTC, Andrei Alexandrescu
wrote:
I'm building with no flags using dmd.
Do dmd -v for verbose output and see what linker flags it is
doing. Perhaps you have a configuration difference that is
causing it not to export the symbol (`fun` isn't marked
On 12/26/2016 07:35 PM, Nicholas Wilson wrote:
On Tuesday, 27 December 2016 at 00:05:39 UTC, Andrei Alexandrescu wrote:
Consider this code:
===
import core.sys.posix.dlfcn;
extern(C) void fun() {}
void main()
{
fun();
void *hndl = dlopen(null, RTLD_LAZY);
if (!hndl)
On Tuesday, 27 December 2016 at 00:05:39 UTC, Andrei Alexandrescu
wrote:
Consider this code:
===
import core.sys.posix.dlfcn;
extern(C) void fun() {}
void main()
{
fun();
void *hndl = dlopen(null, RTLD_LAZY);
if (!hndl) assert(0);
auto p = dlsym(hndl, "fun".ptr);
if
On Tuesday, 27 December 2016 at 00:05:39 UTC, Andrei Alexandrescu
wrote:
Consider this code:
===
import core.sys.posix.dlfcn;
extern(C) void fun() {}
void main()
{
fun();
void *hndl = dlopen(null, RTLD_LAZY);
if (!hndl) assert(0);
auto p = dlsym(hndl, "fun".ptr);
Does
Consider this code:
===
import core.sys.posix.dlfcn;
extern(C) void fun() {}
void main()
{
fun();
void *hndl = dlopen(null, RTLD_LAZY);
if (!hndl) assert(0);
auto p = dlsym(hndl, "fun".ptr);
if (!p)
{
import core.stdc.stdio;
printf("%s\n",
12 matches
Mail list logo