Dependent project problems 
Author Message
 Dependent project problems

Hello,
I recently tried to split off some functionality into a subproject
that should generate a DLL. This works C++-wise but I got something
wrong with the dependencies of the two projects.

Project A makes the exe
Project B makes the DLL

I have set B as a subproject to A, but when I change something in B
and make A, B is not automatically rebuilt. Must I set something in
the options?

Another problem is with the location of the DLL. The working directory
is A/Debug, and it of course it does not find the DLL in B/Debug
automatically. What is a good solution here?

1.) have a post build step in B to copy the DLL somewhere where it can
be found

2.) Have a step in A to make sure the DLL is where A can find it

3.) Use COM to have the DLL registered.

A good mechanism should also take into account the different
possibilities with debug/release versions
Any ideas?

Thanks for your time.
Martin

------------------------------------------------

(replace x with 0 - fight spamming)
------------------------------------------------



Fri, 23 Nov 2001 03:00:00 GMT  
 Dependent project problems
Martin,

Quote:
> I recently tried to split off some functionality into a subproject
> that should generate a DLL. This works C++-wise but I got something
> wrong with the dependencies of the two projects.

> Project A makes the exe
> Project B makes the DLL

> I have set B as a subproject to A, but when I change something in B
> and make A, B is not automatically rebuilt. Must I set something in
> the options?

You have to explicitly tell VC++ that project A depends on B. You do this by
selecting Project -> Dependencies from the menu.

Quote:

> Another problem is with the location of the DLL. The working directory
> is A/Debug, and it of course it does not find the DLL in B/Debug
> automatically. What is a good solution here?

What I do is modify B's project settings slightly. Here's what I do:
In the 'General' tab, I specify as the 'Output Files' directory the same as for
Project A, using appropiate values for debug and release settings. Leave the
intermidiate directory alone, since making it the same for both projects will
quickly get you in trouble.

That works well for me, although I agree it's a royal pain when you have several
projects in the same workspace.

--
Tomas Restrepo

http://members.xoom.com/trestrep/



Sun, 25 Nov 2001 03:00:00 GMT  
 Dependent project problems
On Wed, 9 Jun 1999 21:27:37 -0500, "Tomas Restrepo"

Quote:

>Martin,

>> I recently tried to split off some functionality into a subproject
>> that should generate a DLL. This works C++-wise but I got something
>> wrong with the dependencies of the two projects.

>> Project A makes the exe
>> Project B makes the DLL

>> I have set B as a subproject to A, but when I change something in B
>> and make A, B is not automatically rebuilt. Must I set something in
>> the options?

>You have to explicitly tell VC++ that project A depends on B. You do this by
>selecting Project -> Dependencies from the menu.

Thanks Thomas.
but as I satated in my posting that  I made B a subproject of A, or,
in other words, A depends on B. Is there something ELSE that must be
set?

[snip]

Quote:
>What I do is modify B's project settings slightly. Here's what I do:
>In the 'General' tab, I specify as the 'Output Files' directory the same as for
>Project A, using appropiate values for debug and release settings. Leave the
>intermidiate directory alone, since making it the same for both projects will
>quickly get you in trouble.

Hmmmm - but then you can use B only in A. What should be done later if
C want to use B, too? I recently came to the solution that it is best
to find and load the DLL with the Help of COM.

------------------------------------------------

(replace x with 0 - fight spamming)
------------------------------------------------



Fri, 30 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VC++ 7.0 to 7.1 Project Dependent DLLs generate LNK2001 and LNK2019 errors

2. Using #define to change behaviour of dependent projects...

3. Link error LNK1104 with dependent projects and $(OutDir)

4. LNK1201 error / PDB files and dependent projects

5. compiling with dependent project

6. Compiler Dependent Vs System Dependent

7. System dependent Compile problem?

8. C Problem: Program is Hardware dependent?

9. template problem: dependent name is not a type (warning C4346)

10. a compiler dependent problem

11. Downloading dependent DLL problems

12. Problem deploying web app with dependent library

 

 
Powered by phpBB® Forum Software