digitalmars.D.learn - Using C library libsndfile with D
- kerdemdemir (13/13) Jun 25 2015 Hi
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (15/25) Jun 25 2015 Bindings are for compilation only. You still need to link with the
- bachmeier (3/8) Jun 25 2015 This is the first time I've heard of pragma(lib). It's a nice
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (5/9) Jun 25 2015 They are all here:
- bachmeier (6/10) Jun 25 2015 I meant on this page:
- tcak (3/14) Jun 25 2015 I would expect documentation was to be saying "Added on 2.068"
- Kadir Erdem Demir (6/13) Jun 25 2015 Your advice and your time is very important for me. I will try to
- Steven Schveighoffer (4/16) Jun 25 2015 http://dlang.org/pragma.html#lib
- bachmeier (3/7) Jun 25 2015 Okay. Then I guess it should not be pushed.
- Adam D. Ruppe (4/4) Jun 25 2015 You probably need to make a .lib file from the dll too. The
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 C. But I am getting link errors. Can I use a C DLL directly ? Do I have to add anything to my dub.json file if dll is my project file ? What is "Deimos" stands for ? Is it collections of bindings ? Does community supports "Deimos" projects?
Jun 25 2015
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 compilation only. You still need to link with the libraries, which varies by platform. 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");Can I use a C DLL directly ?Yes.Do I have to add anything to my dub.json file if dll is my project file ?I will let others answer that. I don't know Windows anymore.What is "Deimos" stands for ?All the names come from planet Mars. Phobos is its large moon and Deimos is the small one.Is it collections of bindings ?Yes.Does community supports "Deimos" projects?Yes. Ali
Jun 25 2015
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 the first time I've heard of pragma(lib). It's a nice feature that should be added to the compiler documentation.
Jun 25 2015
On 06/25/2015 12:51 PM, bachmeier wrote:They are all here: http://dlang.org/pragma.html pragma(inline) is the latest, which will be available in 2.068. Alipragma(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.
Jun 25 2015
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. AliI meant on this page: http://dlang.org/dmd-linux.html Someone starting out with D might not look at the pragma documentation. pragma(lib) is easy to miss even if you read that page.
Jun 25 2015
On Thursday, 25 June 2015 at 19:54:34 UTC, Ali Çehreli wrote:On 06/25/2015 12:51 PM, bachmeier wrote:I would expect documentation was to be saying "Added on 2.068" somewhere for it.They are all here: http://dlang.org/pragma.html pragma(inline) is the latest, which will be available in 2.068. Alipragma(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.
Jun 25 2015
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 have it, if you wanna email me the libsoundfile.dll program, I'll run it and make the .lib for you.Your advice and your time is very important for me. I will try to run implib. I think it is important to get use to this tool for future anyways. Thanks alot Erdem
Jun 25 2015
On 6/25/15 3:51 PM, bachmeier wrote:On Thursday, 25 June 2015 at 18:29:23 UTC, Ali Çehreli wrote:http://dlang.org/pragma.html#lib It's got some problems though. Not everyone's system is the same. -SteveD 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 the first time I've heard of pragma(lib). It's a nice feature that should be added to the compiler documentation.
Jun 25 2015
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. -SteveOkay. Then I guess it should not be pushed.
Jun 25 2015
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.
Jun 25 2015