ldc-developers/ldc — Issue #84: Why link fail ?
Author: bioinfornatics
Created: 2012-02-24 02:02:02+00:00
State: open

```
$ ldc2 build/sqlite/database.pic.o build/sqlite/table.pic.o build/sqlite/statement.pic.o build/sqlite/exception.pic.o -L-ldl -L-lsqlite3 -shared -soname libDSQLite-ldc.so.1 -oflibDSQLite-ldc.so.1
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/../../../../lib64/libphobos-ldc.so: undefined reference to `_Dmain'
collect2: ld a retourné 1 code d'état d'exécution
Error: linking failed:
status: 1
make: *** [libDSQLite-ldc.so] Erreur 1
(reverse-i-search)`gcc': ll /usr/lib/^Cc/x86_64-redhat-linux/4.6.2/../../../../lib64/libphobos-ldc.so

$ gcc -shared -lsqlite3 -Wl,-soname,libDSQLite-ldc.so.1 -olibDSQLite-ldc.so.1 build/sqlite/database.pic.o build/sqlite/table.pic.o build/sqlite/statement.pic.o build/sqlite/exception.pic.o

$ ls
build build.sh command.make examples import lib libDSQLite-ldc.so.1 LICENCE LICENSE Makefile README sqlite
```