From: David F. <da...@sj...> - 2003-02-19 12:08:36
|
Earnie Boyd wrote: > Thanks for the patch. I'll take a look at it but plan to do something > different. > > Earnie. Cool, I've sent the full patch to mingw-patches. What is it you're planning to do instead? David > > > David Fraser wrote: > >> David Fraser wrote: >> >>> Hi >>> >>> Earnie recently helped me link my application with msvcrtd instead >>> of msvcrt. >>> The final point reached was to add a -mmsvcrtd switch to the specs >>> file which then links with msvcrtd instead of msvcrt. >>> Then, with a very simple C program, the files link only to msvcrtd, >>> not msvcrt. >>> However, if open() or write() is referenced, the executables still >>> contain a link to msvcrt as well as msvcrtd. >>> This didn't seem to be a problem, but now it does... >>> >>> Basically in our wxWindows app, when linking with msvcrtd, we get >>> errors trying to write to a file. >>> These are reproducible in a very simple wxWindows program, linking >>> in the wx library statically. >>> (They strangely do not occur when trying to do the same thing using >>> standard file functions). >>> I suspect that the problem is that open(), write() are defined in >>> libmoldname, which links to >>> msvcrt by default. This suspicion is confirmed by the fact that >>> using _open, _write doesn't link in msvcrt at all. >>> >>> The solution to me seems to be to build a libmoldnamed.a which links >>> to msvcrtd instead of msvcrt. >>> Is this correct, and how should I go about doing it? >>> >>> Thanks >>> >>> David >> >> >> >> I've now managed to build libmoldnamed.a as described above and it >> fixes the problems I had completely. >> I have attached a patch to runtime to build libmsvcrtd.a and >> libmoldnamed.a >> Any comments, and what is the best way to submit such a patch? >> I'm not sure how to do a patch for msvcrtd.def - it's the same as >> msvcrt.def, but a new file. >> Also, I just used moldname-msvcrt.def to build libmoldnamed.a, should >> I rather make a separate >> moldname-msvcrtd.def? >> >> David > |