Re: DLL's that depend on each other



Hi Scott. First, thank you for helping. You are right that there was
a way to undo the cross references. I had to move two of the files
and their headers back into the original library. I did not really
want to do that but the classes were serialized and I got a reference
error every time the code in the first lib called the Serialize
function (error for GetRuntimeClass). The final result is not as
satisfactory as I had wished but I did end up with 1/4 / 3/4 size
difference between the two libs and that is an improvement.

Thanks again, Russ

On Thu, 21 May 2009 00:05:06 -0500, "Scot T Brennecke"
<ScotB@xxxxxxxxxxxxxxxxxx> wrote:

First of all, I find it hard to believe that there is "no way" to separate the entangled
dependencies. Are the dependencies created by usages of classes in one DLL by classes in the other
DLL? Are you simply having header files that need to #include each other? Have you drawn a class
relationship diagram to identify the dependency paths and look for separated paths?

"Russ" <russk2t@xxxxxxxxxxx> wrote in message news:e7v715dktl96e2e9a9b21j56mn105q6vfm@xxxxxxxxxx
Hi all. I have a large DLL that I thought was becoming unwieldy and I
decided to try splitting it into two separate libraries. I picked a
set of files that relate to one aspect of the operations and created a
new library using just them. This resulted in reducing the size of
the original library by 1/3 and was quite satisfactory. The original
library is my 'main' DLL and it does not depend on any other library
(other than system libs). The new lib was set to depend on the
original and that worked nicely.

However when I went back and removed the moved files from the original
lib, there were a lot of unresolved references. Now comes the
problem. I cannot set the original lib to depend on the new one
because it creates a circular dependency. Understandable. So I got
around that by just adding the new library to the linker input. Well
that compiles and works, but it also creates a circular dependency in
that every time I rebuild my project the two libraries are both
relinked and so is every other project in the solution that depends
upon them.

This is clearly unnaceptable, so what can I do. Am I forced in this
situation to put the libraries back into one to eliminate this cross
dependency, or is there some other way to handle this? I have already
examined the code and determined that there is no way to split the
library in any usable way that would not result in the cross
dependency.

Thanks, Russ

.



Relevant Pages

  • Re: cycle through a table
    ... Is it possible to find our what lib the "Update" finction is in? ... > program and object libraries that provide functionality that may be shared among ... References to the specific library files, including their locations, ... then go back in and unselect the reference you just added. ...
    (microsoft.public.access.modulesdaovba)
  • Re: DLLs that depend on each other
    ... I find it hard to believe that there is "no way" to separate the entangled ... decided to try splitting it into two separate libraries. ... lib, there were a lot of unresolved references. ... because it creates a circular dependency. ...
    (microsoft.public.vc.mfc)
  • Re: "-pthread" == "-lpthread" for shared libs in -CURRENT
    ... Recording dependency to libc_r or libc ... into shared libraries makes shared libraries that work in both threaded ... I think this would help to let firefox do some SSO stuff with kerberos (loading it as a plugin causes it to moan because some depending lib is not loaded, bsam@ should be able to explain the technical details). ...
    (freebsd-current)
  • Re: library not loaded? (C++)
    ... ignoring dependency lines that were simply somelibrary.dylib. ... I finally realized that I needed to make ALL of the references into ... The next step for me is to make the libraries into a framework that I ... $toplib = basename $toplibfull; ...
    (comp.soft-sys.matlab)
  • Using class libraries..
    ... I'm working on a project now and I got 2 libraries and a GUI that uses ... Nothing would compile, not even the utility library that didn't ... so now the utility lib compiled fine. ... Here I had to manually add the utility dll in the references? ...
    (microsoft.public.dotnet.languages.csharp)

Loading