Re: Using C library libsndfile with D

2015-06-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 June 2015 at 18:29:23 UTC, Ali Çehreli wrote: D has the pragma(lib) feature where you can tell the compiler to link with a specific library as well. For example: pragma(lib, curl); You would probably use sndfile in your case (not sure): pragma(lib, sndfile); This is

Re: Using C library libsndfile with D

2015-06-25 Thread Adam D. Ruppe via Digitalmars-d-learn
You probably need to make a .lib file from the dll too. The implib program does that. If you don't have it, if you wanna email me the libsoundfile.dll program, I'll run it and make the .lib for you.

Re: Using C library libsndfile with D

2015-06-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/25/15 3:51 PM, bachmeier wrote: On Thursday, 25 June 2015 at 18:29:23 UTC, Ali Çehreli wrote: D has the pragma(lib) feature where you can tell the compiler to link with a specific library as well. For example: pragma(lib, curl); You would probably use sndfile in your case (not sure):

Re: Using C library libsndfile with D

2015-06-25 Thread Ali Çehreli via Digitalmars-d-learn
On 06/25/2015 12:51 PM, bachmeier wrote: pragma(lib, sndfile); This is the first time I've heard of pragma(lib). It's a nice feature that should be added to the compiler documentation. They are all here: http://dlang.org/pragma.html pragma(inline) is the latest, which will be

Re: Using C library libsndfile with D

2015-06-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 June 2015 at 19:54:34 UTC, Ali Çehreli wrote: They are all here: http://dlang.org/pragma.html pragma(inline) is the latest, which will be available in 2.068. Ali I meant on this page: http://dlang.org/dmd-linux.html Someone starting out with D might not look at the

Re: Using C library libsndfile with D

2015-06-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 June 2015 at 19:54:40 UTC, Steven Schveighoffer wrote: http://dlang.org/pragma.html#lib It's got some problems though. Not everyone's system is the same. -Steve Okay. Then I guess it should not be pushed.

Re: Using C library libsndfile with D

2015-06-25 Thread Ali Çehreli via Digitalmars-d-learn
On 06/25/2015 11:12 AM, kerdemdemir wrote: I downloaded the project from. https://github.com/D-Programming-Deimos/libsndfile I add the sndfile.di file to my project. I thought I could directly use libsndfile.dll since D directly supports C. But I am getting link errors. Bindings are for

Using C library libsndfile with D

2015-06-25 Thread kerdemdemir via Digitalmars-d-learn
Hi I want to read wav files. I thought I can use libsndfile since I am quite familiar with it. I downloaded the project from. https://github.com/D-Programming-Deimos/libsndfile I add the sndfile.di file to my project. I thought I could directly use libsndfile.dll since D directly supports

Re: Using C library libsndfile with D

2015-06-25 Thread tcak via Digitalmars-d-learn
On Thursday, 25 June 2015 at 19:54:34 UTC, Ali Çehreli wrote: On 06/25/2015 12:51 PM, bachmeier wrote: pragma(lib, sndfile); This is the first time I've heard of pragma(lib). It's a nice feature that should be added to the compiler documentation. They are all here:

Re: Using C library libsndfile with D

2015-06-25 Thread Kadir Erdem Demir via Digitalmars-d-learn
D has the pragma(lib) feature where you can tell the compiler to link with a specific library as well. For example: pragma(lib, curl); I want to try that as soon as I get home from work. You probably need to make a .lib file from the dll too. The implib program does that. If you don't