Board index » cppbuilder » Re: CommandLine Tools and "Hello World"

Re: CommandLine Tools and "Hello World"


2003-07-04 08:55:26 PM
cppbuilder17
GregMo wrote:
Quote
First off, I hope this is the right 'forum' for this question. With the
zillons of options out there, is hard to decide where best to properly ask a
question regarding anything 'C'.
For the commanline tool, there is a newsgroup dedicated to it:
borland.public.cppbuilder.commandlinetools
Quote
To boil it down, is there a resource out there that
has, if nothing else, source code for a "Hello World" app that isn't console
based?
Hev a look at :
www.winprog.org/tutorial/
Quote

More over, does anyone know of a good place for someone to discuss their
learning to program for Windows using the free command line compiler?
The commanlinetools group or if you have questions regarding the Win32
API, the nativeapi group.
Michel
--
----------------------------------------
Michel Leunen
mailto: XXXX@XXXXX.COM
www.leunen.com/cbuilder/
----------------------------------------
 
 

Re:Re: CommandLine Tools and "Hello World"

Get this file and unzip it (set the zip options so it will create
directories). In it are several variations of hello world, console mode,
gui mode, standalone and with a dll, implicitly linked dll and explicitly
linked dll.
www.mulroy.org/hello.zip
Not a lot of docs in there but the files are commented. Some of the files
build with a batch file and others with a make file but all build from the
command line.
What you have is the set of command line tools from C++ Builder 5. The
newsgroups where technical questions related to using them are most often
seen are
borland.public.cppbuilder.commandlinetools
borland.public.cppbuilder.language.cpp
borland.public.cppbuilder.nativeapi
I have some links pages mounted which might be of interest. There are links
to tutorials, helpful information files and things specific to the compiler
you are using.
www.mulroy.org/borland.htm
www.mulroy.org/programg.htm
. Ed
Quote
GregMo wrote in message
news: XXXX@XXXXX.COM ...

To boil it down, is there a resource out there that
has, if nothing else, source code for a "Hello World"
app that isn't console based?

More over, does anyone know of a good place for
someone to discuss their learning to program for Windows
using the free command line compiler? A news
group would be preferred, but I'm opened to any forum
that has users that are just getting started as myself.
Before anyone suggests it, yes, I know I should go buy
a book, ...
 

Re:Re: CommandLine Tools and "Hello World"

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in news:3f058005
@newsgroups.borland.com:
Quote
www.mulroy.org/hello.zip

Not a lot of docs in there but the files are commented. Some of the files
build with a batch file and others with a make file but all build from the
command line.
Thanks Ed. I've not snagged this yet, but I'm sure it'll fit the bill
nicely. Found one that just created a window, supposedly written for
bc55.exe, and the dern thing is borked.
<OT>
If interested in seeing it: www.cplusplus.com/src/wintut.zip
</OT>
Cheers,
GregMo
--
UNIX Sex
{look;find;gawk;talk;date;grep;touch;finger;find;flex;unzip;head;strip;
top;mount;workbone;fsck;yes;gasp;fsck;more;fsck;more;more;yes;tail;
fsck;eject;umount;make clean;zip;done;split;exit;uptime>/var/log/brag}
 

{smallsort}

Re:Re: CommandLine Tools and "Hello World"

It seems to work and is smaller than mine. The following command line built
it on my machine:
bcc32 -WR wintut
(his readme says he'd compressed it so we'd likely get a bigger exe than his
22,528 byte one but my build gave a 7,680 byte exe <grin>)
I dislike when people do things like make the body of a function a switch
statement whose default value is to return and then put a return statement
after that will never be used and doubly dislike when someone sets up a
class for no reason.
That said, his code is smaller than mine (of course I put in a few
comments).
Let me know what you think. I threw the hello world thing together because
I got tired of redoing it every time someone asked. If there's something
that can make it easier to understand, I'd like to hear about it.
. Ed
Quote
GregMo wrote in message
news: XXXX@XXXXX.COM ...

>www.mulroy.org/hello.zip
>
>Not a lot of docs in there but the files are commented. Some
>of the files build with a batch file and others with a make file
>but all build from the command line.

Thanks Ed. I've not snagged this yet, but I'm sure it'll fit the bill
nicely. Found one that just created a window, supposedly written
for bc55.exe, and the dern thing is borked.

<OT>
If interested in seeing it: www.cplusplus.com/src/wintut.zip
</OT>
 

Re:Re: CommandLine Tools and "Hello World"

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in
Quote
It seems to work and is smaller than mine. The following command line
built it on my machine:

bcc32 -WR wintut
And there inlies the catch :-) I guess the problem was that it wasn't low
enough down to my level. There was no mention in his readme of the need for
switches, without which, you get this beauty:
Error: Unresolved external '_main' referenced from
D:\PROGRAMMING\BCC55\LIB\C0X32.OBJ
Quote
Let me know what you think. I threw the hello world thing together
because I got tired of redoing it every time someone asked. If there's
something that can make it easier to understand, I'd like to hear about
it.
Thanks. With your example batch files, and this problem with wintut, I see
where I need to go next, which is to learn the compiler options. That in
itself, imho, is a great pointer in the right direction. For now tho, I'm
off to see what havoc I might can cause with your DLL example :-)
Cheers,
GregMo
--
UNIX Sex
{look;find;gawk;talk;date;grep;touch;finger;find;flex;unzip;head;strip;
top;mount;workbone;fsck;yes;gasp;fsck;more;fsck;more;more;yes;tail;
fsck;eject;umount;make clean;zip;done;split;exit;uptime>/var/log/brag}
 

Re:Re: CommandLine Tools and "Hello World"

GregMo wrote:
Quote
And there inlies the catch :-) I guess the problem was that it wasn't low
enough down to my level. There was no mention in his readme of the need for
switches, without which, you get this beauty:

Error: Unresolved external '_main' referenced from
D:\PROGRAMMING\BCC55\LIB\C0X32.OBJ
The switches are needed because with Bcc5.5, you can build console
applications AND/OR window gui applications. In the first case, you need
a main() function and in the case of a GUI app, you need a WinMain()
function.
Look in the bcb5tool.help file that is shipped with the commandline tool
where all the switches are explained.
Michel
--
----------------------------------------
Michel Leunen
mailto: XXXX@XXXXX.COM
www.leunen.com/cbuilder/
----------------------------------------
 

Re:Re: CommandLine Tools and "Hello World"

GregMo wrote:
Quote
Thanks, will do. I hate to have been a pain,
Not at all. You're welcome.
Quote
but you two have been most
helpfull in getting started. Borland ought to put a link in the read me to
winprog :-)
Yes, the free commandline tool comes with nearly no documentation at all
but you can download the help files for C++Builder5 on the Borland site:
info.borland.com/techpubs/bcppbuilder/v5/updates/pro.html
I recommend that you download
b5rtl.zip
b5lang.zip
b5prog.zip
b5ms.zip
b5scl.zip
to get you start.
And there is a bunch of very nice guys here ready to answer all your
questions.
Michel
--
----------------------------------------
Michel Leunen
mailto: XXXX@XXXXX.COM
www.leunen.com/cbuilder/
----------------------------------------
 

Re:Re: CommandLine Tools and "Hello World"

Michel Leunen < XXXX@XXXXX.COM >wrote in
Quote
Yes, the free commandline tool comes with nearly no documentation at all
Yeah, if nothing else, I'd think they ought to at least run a group such as
borland.public.commandlinetools.beginner. I realize that they'd likely want
to through the cppbuilder in the group name, but the trouble with that, as I
understand it, is that "Builder" signifies the IDE and the CLI tools don't
come with the IDE. This makes it confusing as heck for someone that doesn't
already know what's going on around here.
Quote
but you can download the help files for C++Builder5 on the Borland
site:
info.borland.com/techpubs/bcppbuilder/v5/updates/pro.html

I recommend that you download
Downloading them now :-)
Quote
And there is a bunch of very nice guys here ready to answer all your
questions.
No kidding! All my coding of late has been in a script language which has
limited me with some of the things that I've wanted to do. Then comes along
Ed with his hellodll example. Now I can code DLLs in C++ and call them from
my script language making the migration from it to C++ a lot less painfull.
Hopefully, before a month or 6 is out, I'll having a working DDE server
example and be able to communicate between the two that way instead :-)
Cheers,
GregMo
--
UNIX Sex
{look;find;gawk;talk;date;grep;touch;finger;find;flex;unzip;head;strip;
top;mount;workbone;fsck;yes;gasp;fsck;more;fsck;more;more;yes;tail;
fsck;eject;umount;make clean;zip;done;split;exit;uptime>/var/log/brag}