Re: how to import .lib library

2021-08-15 Thread Marcone via Digitalmars-d-learn
On Sunday, 15 August 2021 at 10:12:17 UTC, Timofeyka wrote: Thank you for your reply! I wanted to link to my project another project without source code. This tutorial can help you create yours libs: https://wiki.dlang.org/Win32_DLLs_in_D

Re: how to import .lib library

2021-08-15 Thread Marcone via Digitalmars-d-learn
On Sunday, 15 August 2021 at 09:49:39 UTC, Timofeyka wrote: Hello! I may have a very stupid question, but still. How do I include a .lib library? How to use it in your code? Inside the source code you can use pragma. Example: pragma(lib, "gdi32.lib"); In DMD command line you can use -L flag t

Re: how to import .lib library

2021-08-15 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 15 August 2021 at 10:40:36 UTC, jfondren wrote: Yeah, that's not possible. You either need the source or a set of D interface files that declares all the symbols you need. Meaning, it is possible. On Windows where I assume these .lib files are: I mentioned C libraries in an ear

Re: how to import .lib library

2021-08-15 Thread jfondren via Digitalmars-d-learn
On Sunday, 15 August 2021 at 10:19:33 UTC, Mike Parker wrote: On Sunday, 15 August 2021 at 10:12:17 UTC, Timofeyka wrote: Thank you for your reply! I wanted to link to my project another project without source code. Yeah, that's not possible. You either need the source or a set of D interfa

Re: how to import .lib library

2021-08-15 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 15 August 2021 at 10:12:17 UTC, Timofeyka wrote: Thank you for your reply! I wanted to link to my project another project without source code. Yeah, that's not possible. You either need the source or a set of D interface files that declares all the symbols you need. The compiler

Re: how to import .lib library

2021-08-15 Thread Timofeyka via Digitalmars-d-learn
On Sunday, 15 August 2021 at 10:05:15 UTC, Mike Parker wrote: You don't import a .lib file. They are for the linker, not the compiler. How you make use of it depends on what sort of library it is and how you're building your project. If this is all new to you, it will be easier just to specify

Re: how to import .lib library

2021-08-15 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 15 August 2021 at 09:49:39 UTC, Timofeyka wrote: Hello! I may have a very stupid question, but still. How do I include a .lib library? How to use it in your code? You don't import a .lib file. They are for the linker, not the compiler. How you make use of it depends on what sort of

how to import .lib library

2021-08-15 Thread Timofeyka via Digitalmars-d-learn
Hello! I may have a very stupid question, but still. How do I include a .lib library? How to use it in your code?