DUB and pragma lib - OSX
Joel via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Apr 19 22:53:28 PDT 2016
How do I get this C stuff working with DUB? I tried putting the
pragmas in the main source file.
extern(C) char* readline(const(char)* prompt);
extern(C) void add_history(const(char)* prompt);
pragma(lib, "readline");
pragma(lib, "curses");
Linking...
Undefined symbols for architecture x86_64:
"_add_history", referenced from:
_D5mmisc7getLineFAyaZAya in bookkeeping.o
"_readline", referenced from:
_D5mmisc7getLineFAyaZAya in bookkeeping.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to
see invocation)
--- errorlevel 1
dmd failed with exit code 1.
Joels-MacBook-Pro:BookKeeping joelcnz$
The C stuff works without DUB.
More information about the Digitalmars-d-learn
mailing list