slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] mingwdll.diff


Marko Mahnic wrote:

John E. Davis wrote:

Should this be called libslang.dll?  If so, will
   gcc foo.c -lslang

cause foo to be linked to the dll?  If not, how does one link to this?


First of all I have no experience in unix programming, so I just used
a hint form http://sig9.com/node/35

   $(CPP) $(LINKOBJ) -o "fljed.exe" ... -wslang32.dll

At first I had problems linking to the file libslang.a generated with

   gcc -shared -o libslang.dll $(OBJS) -Wl,--out-implib,libslang.a

Now I tried to make libslang.a/dll again and copied the libslang.a
into the mingw /lib directory.

   $(CPP) $(LINKOBJ) -o "fljed.exe" ... -lslang

compiled and linked (in Dev-Cpp using mingw).
fljed now works with libslang.dll.

Just a question: Why isn't libslang 2.0 named libslang2 ?
Since the licensing of the library has changed between 1.0 and
2.0 someone might need to have both versions installed.

The corrected patch is attached.

(The compilation might also work for CYGWIN32 but I do not have the
time to test it.)

Is there an equivalent to rpath in windows?  How are these libraries
searched during run-time?  I assume that there is some equivalent of
ld.so.


The executable serches for the dll first in its own directory,
then along all directories in the PATH system variable.

Marko

------------------------------------------------------------------------

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


Actually up to  win2k it was:
(currently loaded memory)
current dir
windows32/system dir
windows/system dir
then $PATH

So always in windows, when working with dlls make sure you unload any dlls already loaded. Usually when debugging there would only be one reference loaded, but when weird things begin to happen thats the first thing to check.

I have no idea how WinXP does this. I understood they changed this, since it is a common problem for dlls to walk over each other, i.e. 'DLL hell'.



_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]