Linking to C

2010-11-02 Thread scrappylildude
Hello, New to D, but I am loving it so far. I am having some trouble linking to a C library static library (LibRaw 0.10.0). I ran htod on the LibRaw header files, and fixed up the resulting file by hand. Now when I compile and attempt to link, I get one error: Undefined symbols: "_D16libraw

Re: Linking to C

2010-11-02 Thread Mike Chaten
How are you compiling & linking the files? I've gotten this error before when I forgot to include a file in my compilation (in your case libraw_c_headers) On Tue, Nov 2, 2010 at 8:47 PM, scrappylildude wrote: > Hello, > > New to D, but I am loving it so far. > > I am having some trouble linking

Re: Linking to C

2010-11-02 Thread Andrei Alexandrescu
On 11/2/10 7:47 PM, scrappylildude wrote: Hello, New to D, but I am loving it so far. I am having some trouble linking to a C library static library (LibRaw 0.10.0). I ran htod on the LibRaw header files, and fixed up the resulting file by hand. Now when I compile and attempt to link, I get

Re: Linking to C

2010-11-02 Thread scrappylildude
Thank you Andrei! I thought because I had imported libraw_c_headers.d in myfile.d that I didn't need to do that. Thank you, it works perfectly. P.S. Sorry, perhaps this question should have been posted in D.Learn?

Re: Linking to C

2010-11-02 Thread Nick Sabalausky
"scrappylildude" wrote in message news:iaqgha$1p6...@digitalmars.com... > Thank you Andrei! > > I thought because I had imported libraw_c_headers.d in myfile.d that I > didn't need to do > that. > If you use something like rdmd or xfbuild then you can just specify the "main" D file, and it'll

Re: Linking to C

2010-11-02 Thread Andrei Alexandrescu
On 11/2/10 9:14 PM, scrappylildude wrote: Thank you Andrei! I thought because I had imported libraw_c_headers.d in myfile.d that I didn't need to do that. Thank you, it works perfectly. P.S. Sorry, perhaps this question should have been posted in D.Learn? rdmd takes care of figuring out dep

Re: Linking to C

2010-11-02 Thread scrappylildude
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 r

Re: Linking to C

2010-11-02 Thread Nick Sabalausky
"scrappylildude" wrote in message news:iaqu6l$2sq...@digitalmars.com... > 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

Re: Linking to C

2010-11-02 Thread Mike Chaten
Any options with just one dash afaik (ala -L) will pass through to dmd. On Wed, Nov 3, 2010 at 2:07 AM, scrappylildude wrote: > 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 utilit

Re: Linking to C

2010-11-03 Thread Nick Sabalausky
> Any options with just one dash afaik (ala -L) will pass through to dmd. > Yes, although they have to come before the main D file, so it has to be like this: rdmd -Lwhatever main.d NOT: rdmd main.d -Lwhatever