digitalmars.D - libraries.a
aalku <aalku_member pathlink.com> writes:
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
Jul 01 2004
"Walter" <newshound digitalmars.com> writes:
"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.htmlor 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)
Jul 01 2004
"me" <memsom interalpha.co.uk> writes:
or better, How do I use a .a library with D Compiler?
.a libraries are for linux, for Windows use .lib files created with
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
Jul 02 2004