C++ Builder IDE >> Problems with setting output directory

by Jody Bowman » Fri, 05 Aug 2005 02:02:56 GMT

Howdy,

I'm having a sporadic problem with a C++ Builder 6 project, and I'm
hoping someone out there can help. What I'm trying to do is create a
program to generate a mass software release. This involves compiling
several dozen programs and delivering their results to a single output
directory. I have an application which opens a series of projects, changes
their output directories to one that the user specifies, compiles them, then
sets the output directories back to what they had been.
The problem I'm having is that when I apply this process certain
projects, consequent attempts to open the project fail with the error:

Rule for project "ABC.exe"" does not exist.

I can reproduce the problem outside my application by doing this:

Open a project that I know works, FMSAddressFileServer.exe.
Go to Project | Options | Directories/Conditionals.
Use the [...] button to select a Final Output directory, in my case "c:\FMS
Output".
Hit OK to close the Options.
Hit Save All at the base IDE to save the change. At this point everything
is hunky-dory.
Go back into Project | Options | Directories/Conditionals.
Hit OK without making any changes.
Hit Save All at the base IDE.
Select File | Close All to close the project.
Select File | Open Project to reopen the project.

The project open fails, reporting

Rule for project "FMSAddressFileServer.exe"" does not exist.

If I open the BPR in a text editor the <PROJECT> option is now:

<PROJECT value=""C:\FMS Output\FMSAddressFileServer.exe""/>

If I delete the last " the project opens but compilation fails with the
error message:
[Linker Error] Could not create "C:\FMS Output\FMSAddressFileServer.tds
(error code 123)

123 is INVALID_NAME, which makes sense due to the stray quote in the file
name.


I'm running Windows XP Professional and C++ Builder 6 Enterprise. The
modification of the output directory is done by setting the PROJECT value to
include the specified output path via the _di_IXMLDocument class in
XMLDoc.hpp.
Any suggestions would be appreciated, and thanks in advance.

Jody Bowman
XXXX@XXXXX.COM




Similar Threads

1. How to specify different output directory/intermediate directory than .DSP

As part of our automated build environment which builds silently from the
command line overnight, I'd like to the override specific settings in all
our .DSPs file - Specifically I'd like to specify my own Output Directory
directory, Intermediate Directory and possibly output path/filename.

I want all our executables built in a specific directory, rather than what
the C++ developer has decided when authoring the .DSP.

I'm not a C++ developer, and neither can I find any documentation which
explains what may be possible.

Does anybody know if it's possible to override the .DSP settings when
invoking MSDEV? command line switches?

One solution I did think of was to programmatically open/edit/save the DSPs
file when they are gotten out of SourceSafe, but I would rather not have to
mess with the .DSP file format unless there was no other option.

All advice much appreciated.

Alastair


2. major problem in c# 2005 with unit tests & copying content to output directory - CSharp/C#

3. Problem with setting directory permissions

I'm working on a program for creating user accounts. I'm having issues
with setting the permissions.

Here's an example:

String homeDir = @"\\SERVER\directory\"+username;

//Create the directory
Directory.CreateDirectory(homeDir);

//Get the default security settings
DirectoryInfo hInfo = new DirectoryInfo(homeDir)
DirectorySecurity dirSec = hInfo.GetAccessControls();

//Add modify permissions for this user
dirSec.AddAccessRule(new FileSystemAccessRule(@"SERVER\"+username,
FileSystemRights.Modify, AccessControlType.Allow));

//Set the permissions for the directory
hInfo.SetAccessControl(dirSec);

What ends up happening is that the user gets added to the list in the
security tab for the folder, but they don't have any permissions.
Incidentally, this code compiles fine so if there's a missing
parenthesis or something it's a typo.

4. How to set the database path to directory other than the project directory - Borland C++ Builder VCL Components

5. Output directory not working when there's a period in the project name

6. Which newsgroup or any comments- Vista/D2007/Output directory

7. Delphi 2007 output directory is ignored!

8. BDS2006: LIBs not copied in BPI/LIB output directory - Borland C++ Builder VCL Components