Well I'm progressing -slowly

John Reimer terminal.node at gmail.com
Mon Feb 18 19:22:48 PST 2008


David Wilson wrote:
> Hi Ty,
> 
> Have you got the static variants of those libraries installed? (i.e.
> libm.a)  Seems you are doing a static link using dynamic libraries..
> 
> On Debian, these are found in package "libc6-dev", other distros will
> have them elsewhere.
> 
> 
> David.
> 


On Linux, linking is exactly the same for static and dynamic libraries. 
  This is one of the advantages of the linux system.  There is no dll or 
import library complexity to deal with as there is on Windows.

The difference with the developer packages is that they usually supply 
both the static and dynamic libs without the postfix version numbers, 
They also supply the necessary C headers and documentation.

Some Linux distributions include the developer versions of the libraries 
by default.  Other distributions do not.  Ty might have to download 
these libs to get things working... which would explain a lot of the 
problems he's been having.

I notice also that the command line error complained "/usr/bin/ld: 
cannot find -lm"  which is odd.  It seems to be not interpreting the 
commandline flag: I would expect it to say "cannot find libm.a (or 
libm.so).  But I'm not certain.  Nonetheless the compiler is looking for 
the the non-version decorated libm and cannot find it.

Incidentally, libm is the default math library on linux.  Most linux 
should have it installed.  The developer lib package may be necessary to 
access this library directly, but even then one could access the 
non-developer version simply by making a symbolic link to the versioned 
one in the lib directory where it resides.  Or one could even provide 
the full path the the versioned library on the command line to achieve 
the same thing.

But instead of fiddling with the system, the user should just download 
the necessary developer version of these libraries.

Part of these problems seem to be that Ty is unfamiliar with linux, or, 
at least, linux development.  If this is the case, there is a LOT more 
to help out with then just dmd/dwt related issues.  Linux is not an easy 
system to learn to program on since there are many tools with which to 
get familiar. Thus, we must assume, to some extent, that the dwt user 
has some familiarity with the system he develops on.  It would horribly 
time-consuming otherwise to have to step the user through platform 
development peculiarities and linux administration.

Thankfully, we don't have to do that... since there appears to be an 
amazing supply of very accommodating and knowledgeable people here.  But 
I do think it is unfair to assume we owe such a user all our time and 
attention for such details.

-JJR


More information about the Digitalmars-d-dwt mailing list