Linking to C

scrappylildude sdl at yahoo.com
Tue Nov 2 23:07:17 PDT 2010


That's great--thanks Nick, Andrei.

I tried it and it looks like I haven't configured something right.   I'm building a sample
project with my program, my utility class library and libraw.  I've added the path to
libraw_c_headers.d to dmd.conf, now that I don't have a -I switch any more (using
rdmd).

When I use rdmd, something like my original error seems to have returned:  :(

rdmd --build-only helloworld.d

Undefined symbols:  "_D4hecl4base8HECLBase11__InterfaceZ", referenced from:
_D4hecl4base12__ModuleInfoZ in helloworld.d.old: symbol(s) not foundcollect2: ld
returned 1 exit status
--- errorlevel 1

My project is organized as follows:
root/
    stuff_i_made/
        my project/
            helloworld.d
        my class library/
            hecl*.d
    stuff_I_didnt_make/
        libraw/
            lib/
                libraw_r.a
            src/
                libraw_c_headers.d

Using --dry-run seems to show everything except the libraw_r.a.  Since I don't have a
-L switch with rdmd, I assume this is the problem?







More information about the Digitalmars-d mailing list