| |
| Posted by Carl Sturtivant in reply to Mars | PermalinkReply |
|
Carl Sturtivant
| On Wednesday, 15 February 2012 at 13:49:45 UTC, Mars wrote:
> Hello, everybody.
>
> I'm trying to compile Lua, using DMC, since I need the lib in OMF. I got the compilation working, but I have no clue, on how to turn the .obj files into a .lib. In D I'd use the -lib argument, but I couldn't figure out how to do this with DMC/OPTLINK yet.
> If I just do
>> dmc src\lapi.c src\lauxlib.c [...] -olua5.1.lib
> I get
>> OPTLINK : Warning 134: No Start Address
> and when trying to use this .lib
>> Not a Valid Library File
> from DMD.
>
> What's the correct way to do this?
>
> Mars
If you don't just want an import library (which still needs the DLL at runtime) then don't use implib. That is, if you want a self-contained static library, instead use
dmc -c lapi.c lauxlib.c [...]
to compile each source file to an OMF object file.
Now use the librarian that comes with dmc to construct an OMF lib from all those objects.
lib lua.lib lapi.obj lauxlib.obj [...]
http://www.digitalmars.com/ctg/lib.html
|