On Friday, 18 March 2016 at 10:38:00 UTC, Nafees wrote:
On Friday, 18 March 2016 at 10:25:06 UTC, Mathias Lang wrote:
On Friday, 18 March 2016 at 10:11:50 UTC, Nafees wrote:
On Friday, 18 March 2016 at 10:07:18 UTC, Nafees wrote:
I tried to create a separate module for storing classes in, this is the new module
<code>
module qlib.classes;

[...]

Plus, the code works if the class is in the same module, and I did add the path to the QLib.classes module in the compiler.

See the compilation command:
dmd -O -release "main.d" "-I/usr/include/dmd" "-I/home/nafees/Desktop/Projects/DLibrary" "-odobj/Release" "-of/home/nafees/Desktop/Projects/LrnD/LrnD/bin/Release/LrnD" -w -vcolumns

Here your module is not linked in, only main.d

Now I created a folder in the usr/include/dmd named qlib and placed the module there, yet it won't work.

Just realized this was in the wrong forum. Please move your question to learn (http://forum.dlang.org/group/learn), as General is intended for general-purpose discussion. You might want to provide additional informations, like which build tool you are using.

The problem is not where the module lives (the compiler would complain if it couldn't find it), but that you didn't ask for the module to be part of your executable. To do so, you need to add `path/to/qlib/classes.d` to your command line.

Reply via email to