David,

Thanks for the prompt reply.  

I had an issue with the PATH=$(geconf PATH) line in the /usr/lib/mkdeffile that 
caused the path to be NULL and nothing to be found after that.  Once I 
commented this line, all was good.  getconf works from the shell and PATH is in 
the getconf --all output so I'm not sure what's going on there?

I can make a .def file and all works good.  I can build the DLL, lib and link 
and use them in Visual Studio just fine.  I'd like to avoid having to make a 
def file though.  I'd likely automate it, but it would be some work.  I think I 
can work with the .a file and make a script, looking for the '5|_' symbols and 
numbering them sequentially in the .def file @n.

I can't get the empty .ign file to work for the life of me.  I haven't 
explicitly declared functions as 'extern'; however, even when I do, they aren't 
exported?  Is there some special magic here?  My convention has been to declare 
'private' functions as 'static' but to not declare my 'public' functions in any 
special way.  It also looks like the mkdeffile output fails when building with 
.ign with several '-uThe system connote find the file specified.\nInvalid 
switch' errors.

Any further help appreciated, and I'll get started on making some def files in 
the meantime.

- Dean



On 2013-03-15, at 8:16 AM, David Korn <[email protected]> wrote:

> cc: [email protected]
> Subject: Re: [uwin-users] Follow-up on dll
> --------
> 
> 
>> Well, I know how to make a DLL with Visual Studio.  What I want to do is 
>> make a 
>> DLL like the posix.dll, with an nmakefile and the proper switches, that I 
>> can li
>> nk from Visual Studio.  I guess I will parse the nmakefile for posix.dll.
>> 
> 
> First of all, look at 
> 
> 
> An nmake makefile that will generate a dll is something like the following:
> 
> ====================cut here===========================
> libname = foo
> 
> CCFLAGS = $(CC.OPTIMIZE) $(CC.DLL)
> 
> $(libname) 1.0 :LIBRARY: file1.c ... fileN.c -llib1 ... -llibN 
> ====================cut here===========================
> 
> nmake all
> 
> will generate libname.a in the current directory and a subdirectory
> named libname.so containing the .dll and .lib files.
> 
> Note that /usr/doc/dlls.html explains various ways to get
> export symbols for the library.  The simplest way is to
> create an empty file named libname.ign and add this to the list
> of files for :LIBRARY:.  This will make every extern function
> an exported function.  libname.def will only make the ones
> named in libname.def exported.
> 
> David Korn
> [email protected]

_______________________________________________
uwin-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/uwin-users

Reply via email to