Thread overview |
---|
July 01, 2004 libraries.a | ||||
---|---|---|---|---|
| ||||
Hi! I've got a problem. Can anybody help me? The problem is that I can code but I never get to use 'many compliling-tools'. I usually use dev-cpp to code in c++. I do like D and want to start coding on it. I just got D port of SDL (http://www.libsdl.org/) that is on 'Dedicated' web and updated it to the current version of D language. Then I compiled some examples. They looked nice. So... I tried to use SDL_Image (http://www.libsdl.org/projects/SDL_image/) library that loads image files into memory so it can be used with SDL. That library is written in C so I compiled it with dev-cpp to get a static library. The problem is that dev-cpp is unix-like (but for win32) so it generate a .a library file and D Compiler only let me import .lib libraries. I tried to compile the library with digital mars C compiler (dmc) and I can do it but I am not able to get a library but only a .exe (without starting point). How do I get a library from dmc? or better, How do I use a .a library with D Compiler? Thanks a lot. aalku |
July 02, 2004 Re: libraries.a | ||||
---|---|---|---|---|
| ||||
Posted in reply to aalku | "aalku" <aalku_member@pathlink.com> wrote in message news:cc28er$30tn$1@digitaldaemon.com... > How do I get a library from dmc? see www.digitalmars.com/ctg/lib.html > or better, How do I use a .a library with D Compiler? .a libraries are for linux, for Windows use .lib files created with lib.exe (www.digitalmars.com/ctg/lib.html) |
July 02, 2004 Re: libraries.a | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | > > or better, How do I use a .a library with D Compiler? > > .a libraries are for linux, for Windows use .lib files created with lib.exe > (www.digitalmars.com/ctg/lib.html) It might be better to build a DLL. You should be able to build a DLL from DevCPP, it's just another project type. IIRC DevCPP will create you a skelleton, and you must just fill in the blanks. Failing that, just download the prebuilt DLL and use the implib tool to generate a lib file. DLL's are the way to go with SDL, otherwise the apps are bloated by the size of the lib code copied into each exe. With a DLL it would be centalised, so to speak. Matt |
Copyright © 1999-2021 by the D Language Foundation