Well I'm progressing -slowly

Ty Tower tytower at hotmail.com.au
Tue Feb 19 01:26:47 PST 2008

John Reimer Wrote:
> 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.
My distro is Mandriva 2007 spring and I have the developer packages installed.
As I said the libraries are there under the name of /lib/libm-2.4.so , and linked  to it is  libm.so.6

> 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. 

You assume a lot . and incorrectly at that . I have a fairly intimate knowledge of Linux but this I have not seen before.  I have approached it on a look at what is happening in the compile command from the start and gradually understand what each swith or control is supposed to do and make sure it can do it .  I think I am at the last of that and this problem  is offered for solution by anyone more knowledgeabl than me on compiling and linking.

I don't think either my approach or your wrong assumption justify the comments below

> 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

If you look at the example program "helloworld1.d"which I will attach here , there are a lot of problems in dwt . The writer's comment is effectively " I don't know why but you have to import the following libraries or you will get linker errors"

Perhaps if you are going to spend the time to type and post in such quantity you could stick to why you think "-lm" might not be being found .

I have tried putting /lib/ in front of my PATH and also at the end to no avail. I have copied both file and link to /usr/lib aain to no avaail . This is my $PATH  
When I find the cause for the triple qt entry I'll be in heaven.

I'm starting to think the library may have been corrupted somehow. Have you had any reports of file corruption by dmd or dsss?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld1.d
Type: text/x-dsrc
Size: 1215 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-dwt/attachments/20080219/3a79f2ea/attachment.d 

More information about the Digitalmars-d-dwt mailing list