FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linking problem when using other code that requires std.zip

 
Post new topic   Reply to topic     Forum Index -> Schooner
View previous topic :: View next topic  
Author Message
gmlewis



Joined: 08 Mar 2007
Posts: 1

PostPosted: Thu Aug 09, 2007 2:04 pm    Post subject: Linking problem when using other code that requires std.zip Reply with quote

Hi!

First off, I would like to say a big "Thank you" to Bradley for writing Schooner. I wrote the original D-binding that is included with GLFW, and having a totally native-D implementation is wonderful. Great job, Bradley!

Secondly, I'm now trying to write my first application with Schooner, and run across the following linking error:

c:\dmd\bin\..\lib\phobos.lib(zutil) Offset 0BA5CH Record Type 0091
Error 1: Previous Definition Different : _zcalloc
c:\dmd\bin\..\lib\phobos.lib(zutil) Offset 0BA69H Record Type 0091
Error 1: Previous Definition Different : _zcfree
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BC5BH Record Type 0091
Error 1: Previous Definition Different : _inflateReset
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BC82H Record Type 0091
Error 1: Previous Definition Different : _inflateInit2_
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BCA3H Record Type 0091
Error 1: Previous Definition Different : _inflate
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BCB4H Record Type 0091
Error 1: Previous Definition Different : _inflateEnd
--- errorlevel 6

After a bit of digging, I found out this:

C:\src\schooner-3>lib -l freetype\freetype_dmc.lib
Digital Mars Librarian Version 8.02n
Copyright (C) Digital Mars 2000-2007 All Rights Reserved
http://www.digitalmars.com/ctg/lib.html
Digital Mars Librarian complete.
C:\src\schooner-3>grep -i zcalloc freetype\freetype_dmc.lst
_zcalloc ftgzip
_zcalloc _inflateReset

So it appears that somehow the linker is putting 'zcalloc' into the freetype_dmc.lib file so that when it later tries to link my application with phobos.lib, it produces the above error.

At this point, I'm a bit stuck... I could probably try and remove the offending functions from the freetype_dmc.lib file, but that seems like a royal hack, and probably unnecessary too.

Does anyone have any ideas? I'm running on Win32, DMD V1.0.15.

Thanks!
-- Glenn Lewis
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Tue Oct 16, 2007 2:07 pm    Post subject: Re: Linking problem when using other code that requires std. Reply with quote

No ideas, sorry, but you might try emailing Bradley directly.
He doesn't check the forums too often.

...And I think he's not really doing anything with D these days, anyway.
Back to top
View user's profile Send private message
Bradley Smith



Joined: 20 Jun 2006
Posts: 60

PostPosted: Wed Oct 17, 2007 12:01 pm    Post subject: Reply with quote

Sorry, but I am no longer supporting this project. I have decided, for now, that D is too unstable for useful work. By unstable, I do not mean instability of the D tools or libraries, but the instability in the D language, such as the following:

  • Conflict between Tango/Phobos runtime libraries
  • Design differences between D 1.x and 2.x
  • Design problems with D 2.x
  • etc.

I am hopeful however that D will eventually solve these problems.

I have posted a new topic seeking a new project manager. I should have done this sooner, but I wanted to wait for a bit to see if the situation might improve.
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Thu Nov 01, 2007 7:08 pm    Post subject: Re: Linking problem when using other code that requires std. Reply with quote

gmlewis wrote:
Hi!
I'm now trying to write my first application with Schooner, and run across the following linking error:

c:\dmd\bin\..\lib\phobos.lib(zutil) Offset 0BA5CH Record Type 0091
Error 1: Previous Definition Different : _zcalloc
c:\dmd\bin\..\lib\phobos.lib(zutil) Offset 0BA69H Record Type 0091
Error 1: Previous Definition Different : _zcfree
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BC5BH Record Type 0091
Error 1: Previous Definition Different : _inflateReset
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BC82H Record Type 0091
Error 1: Previous Definition Different : _inflateInit2_
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BCA3H Record Type 0091
Error 1: Previous Definition Different : _inflate
c:\dmd\bin\..\lib\phobos.lib(inflate) Offset 0BCB4H Record Type 0091
Error 1: Previous Definition Different : _inflateEnd
--- errorlevel 6

After a bit of digging, I found out this:

C:\src\schooner-3>lib -l freetype\freetype_dmc.lib
Digital Mars Librarian Version 8.02n
Copyright (C) Digital Mars 2000-2007 All Rights Reserved
http://www.digitalmars.com/ctg/lib.html
Digital Mars Librarian complete.
C:\src\schooner-3>grep -i zcalloc freetype\freetype_dmc.lst
_zcalloc ftgzip
_zcalloc _inflateReset

So it appears that somehow the linker is putting 'zcalloc' into the freetype_dmc.lib file so that when it later tries to link my application with phobos.lib, it produces the above error.

Does anyone have any ideas? I'm running on Win32, DMD V1.0.15.



1.015 is a pretty old compiler, does the bug still occur with something newer? (I realize that Schooner doesn't actually compile out of the box with a newer compiler, but I posted a patch a while back...)

Barring that can you post a small example that reproduces the problem?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Schooner All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group