Using tango or other static lib in static lib

Voitech via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 12 14:34:19 PST 2016


At beginning I want to say that I'm Java devloper so most of 
linking, joining, dependent classes, libs could be solve with 
simple 3 click in eclipse so please be patient with me :).
I'm using Mono-D under Ubuntu 14.04 to create my project it would 
be a library for further development process, but I'm a guy who 
don't want to invite wheel again and again, so i wanted to use 
Tango-D2 (for now HashMap implemenetation). From what i red you 
cant import one static library with another but somehow import o. 
files, or just copy sources .d to proper folder and use them as 
yours (with proper license of course). Tango-D2 by itself 
compiles nicely with bob and produces many .o files. How to use 
them though ?
If using sources by just copping them into one folder, creating 
Mono-D project, dmd complains about many, many errors, mostly 
import errors (in tango.sys.win32). I fixed them adding version 
to each of included files and adding some imports first:
module tango.sys.win32....
version(Windows){
...
...
}

But i think I'm doing something wrong, if Tango-D2 compiles with 
bob it should also by creating project in Mono-D (or this is 
linking problem ?). In Mono-D there is also possibility in 
Project-> Options-> Build-> Compiling to add Libraries (there is 
a tick Link static libraries from nested dependencies) how to use 
this ? Or rather how should i obtain what i want ?


More information about the Digitalmars-d-learn mailing list