On Sunday, 13 July 2014 at 01:53:10 UTC, Mike Parker wrote:
On 7/13/2014 3:54 AM, Israel Rodriguez wrote:
The linker errors do not refer to libcolorize. Notice this:
"_D4dlib4math6matrix". That is a dlib.math.matrix module. Is
that a source module in your project or something from another
library? If the former, you need to be compiling it along with
your main.d. If the latter, you need to be linking with that
library. However, I recommend you avoid using dmd on the
command line for now and just use dub to manage your project
(see below).
This has nothing to do with the json generated by DMD. It's
referring to a dub.json which is a project configuration file
for dub. If you create a dub.json, then you can run "dub" or
"dub build" in your project directory and it will automatically
compile all of your source modules and make sure that all of
your dependencies (such as libcolorize) are downloaded,
compiled and link. It's a complete build and package management
system. You don't need to download your dependencies manually
or compile from the command line if you are using dub. You can
read more about the dub.json format at [1].
[1] http://code.dlang.org/package-format
Awesome thanks. Sorry about that linker error, i copied and
posted the wrong error from a previous compile trial. Anyways i
managed to fix my problem and my static libraries now compile
without errors.
I will play with dub a little bit more. Thanks. I just thought i
would learn from the beginning compiling and linking manually
within the terminal. I had no idea dub could do all that for me.
What about the dub libraries, what kind of errors do you get if
you try to use a library not compatible for your system, say OSX
or Linux? Im assuming the same linking errors but im not sure.