Board index » cppbuilder » Generating empty projects in the BCB IDE

Generating empty projects in the BCB IDE

Isn't there some way of generating an empty project in BCB? Eg a project
without any files generated for you?
If you want to compile code from other sources, you end up having to c/p
from that code into the main file that BCB insists on generating for
you.(whats the condefs.h header for anyway?) and which you cannot remove.
VC++ seems to handle this a lot more elegantly. I do realize that BCB is
more targeted at VCL development than general C++ programming, but I don't
feel I'm asking for much here. Even JBuilder had a way past all the dialogs
and wizards.If you clicked Open, then gave the name of a nonexistent jpr
file, you'd get a clean JBuilder project without any generated files. Why
cannot BCB let you do the same?
So...am I missing something here? Is there some way of doing this that has
completely passed me by? Or are there third party tools that lets me do
this(or more to the point, could I program one? :)
(Yes, I know I can invoke the compiler from the commandline...and I'm pretty
familiar with that from using g++. But that would pretty much defeat the
purpose of using an IDE)

MVH
Arild Fines

 

Re:Generating empty projects in the BCB IDE


Quote
"Arild Fines" <arild.fi...@nospam.broadpark.no> wrote in message

news:3b44b5c0_2@dnews...

Quote
> Isn't there some way of generating an empty project in BCB?

Your post affected my aura.  All this negativity drains me, man! <g>

Are you using BCB5?  If so, "File | New | Console Wizard".  Then choose C or
C++ and turn on/off the VCL as desired (sounds like you want it off).

If you already have existing code then you can also click on "Specify
Project Source" and choose your already existing source file.

If you are using BCB4 I believe the steps are similar as above but you do
not have the option to specify an existing project source file and must use
a trick to do so.

- Clayton

Re:Generating empty projects in the BCB IDE


"Clayton M. Arends" <nospam.claytonare...@hotmail.com> wrote in message
news:3b44c128$1_2@dnews...

Quote
> "Arild Fines" <arild.fi...@nospam.broadpark.no> wrote in message
> news:3b44b5c0_2@dnews...
> Your post affected my aura.  All this negativity drains me, man! <g>

I wasn't that negative, was I? :)

Quote
> Are you using BCB5?  If so, "File | New | Console Wizard".  Then choose C
or
> C++ and turn on/off the VCL as desired (sounds like you want it off).

Nope...BCB4...but I was already aware of the Console Wizard. I should have
specified it, but I thought the condefs.h remark made it clear.

Quote
> If you are using BCB4 I believe the steps are similar as above but you do
> not have the option to specify an existing project source file and must
use
> a trick to do so.

Thats pretty much what I'm complaining about. VC++ has no problems
generating a project/workspace/whatever without forcing some generated file
down your throat.

And in the spirit of non-negativity: Have a happy 5th of July!

MVH
Arild Fines

Re:Generating empty projects in the BCB IDE


Quote
"Arild Fines" <arild.fi...@nospam.broadpark.no> wrote in message

news:3b44c83f_2@dnews...

Quote
> Nope...BCB4...but I was already aware of the Console Wizard. I should have
> specified it, but I thought the condefs.h remark made it clear.

I thought that "condefs.h" still existed in BCB5 but after creating a few
new projects with varying settings I see that it isn't automatically added.
But, I do believe that if you create a console app with the VCL option
turned off in BCB4 that condefs.h will not be included.

Quote
> > If you are using BCB4 I believe the steps are similar as above but you
> > do not have the option to specify an existing project source file and
> > must use a trick to do so.

> Thats pretty much what I'm complaining about. VC++ has no problems
> generating a project/workspace/whatever without forcing some generated
> file down your throat.

Well then the answer to your original question is ... yes, if you have BCB5.
Since you don't you can follow the these steps.  You still have the
auto-generated file but at least you don't have to play the c&p game and you
won't have to mess with the file again.  Also, you can create this project
once, save it somewhere with a project name like "EmptyProject" and then you
won't have to go through the same steps again.  Just "open project" and then
"save project as..." for each new application.

After creating your console application (plus or minus the VCL) delete the
main() function in your main source file.  Then add the following line in
its place:

    #define main

Now, add your source files to the project and compile.  Everything should
compile just fine, assuming your source code *should* compile given include
paths, libraries, yadda yadda.

Quote
> And in the spirit of non-negativity: Have a happy 5th of July!

Heh heh.  Right back at ya.

- Clayton

Re:Generating empty projects in the BCB IDE


FWIW, in BCB5, you can just do a File|Open on your source file and the IDE will
ask you if you'd like to create a project for that file, if the file contains a
"main" or "WinMain".  This should also save you the hassle of cutting and
pasting.

Quote
Arild Fines wrote:
> > Are you using BCB5?  If so, "File | New | Console Wizard".  Then choose C
> or
> > C++ and turn on/off the VCL as desired (sounds like you want it off).

> Nope...BCB4...but I was already aware of the Console Wizard. I should have
> specified it, but I thought the condefs.h remark made it clear.

--
Chris Hesik
BCB/Kylix/Delphi R&D

Other Threads