Program exited with code -11
Charles Hawkins via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 23 00:57:25 PDT 2015
On Tuesday, 23 June 2015 at 07:25:05 UTC, Baz wrote:
> On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote:
>> On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote:
>>> On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins
>>> wrote:
>>>> Thanks, Adam. I'm coming from OCaml and haven't seen a seg
>>>> fault in years. Didn't recognize it. :D Hopefully I can
>>>> figure it out from here.
>>>
>>> Try to compile with either ldc or gdc and the -g flag, it
>>> should give you a backtrace. dmd seems to not like linux wrt
>>> backtraces.
>>
>> Thanks. I wish! I haven't had any success in compiling with
>> anything but dub. gdc, dmd, rdmd always give me "module mylib
>> is in file 'mylib.d' which cannot be read" on my "import
>> mylib;" statement. I've tried every permutation of -I and -L
>> that I can think of. It almost appears that one either uses
>> dub for everything or nothing and I'm getting pretty
>> frustrated with it as well. Perhaps I should just go back to
>> old-fashioned make files?
>
> in dmd you have to pass
> - the .lib/.a files a source
> - the path to the lib source with '-I'. Sometimes when the path
> is not well indicated you get the error you talk about. This is
> because the '-I' path must follow carefully the structure of
> the lib, e.g
>
> 'import myLib.package.moduleThis':
> the '-I' must point to the folder that contains the folder
> 'myLib'.
Sigh. I'm probably doing something stupid. I tried full paths:
dmd -I+/home/charles/projects/d/mylib/source/mylib/ myprog.d
/home/charles/projects/d/mylib/build/libmylib.a
Same result.
myprog.d(4) Error: module mylib is in file 'mylib.d' which cannot
be read
Statement in myprog is:
import mylib;
I used tab expansion so I'm confident everything is spelled
correctly. Since dub will compile it, I also tried copying and
pasting its entry from the local packages file (leaves off the
"source/mylib/"). Is there a way to find out what command dub is
passing to dmd?
More information about the Digitalmars-d-learn
mailing list