g++ support

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Delfas
Posts: 1
Joined: Fri Mar 19, 2004 11:18 pm

g++ support

Post by Delfas »

A newbie question.

I guess my problem is that I don't have access to Windows compilers like VC++ or BC++. So, I think that my only option is to use g++ under Cygwin to build cross platform using Emacs.

Under XP, is it possible to configure TextPad to use g++? Or is Emacs my only option?


Appreciate your answers.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Hmm, think this might answer your Q. If you can use Borland C++ Free Command Line Tools and Turbo Debugger that is.
Did find one post on g++ though, it mentions "the mingw-compiler" and it looks like you can use the borlandtip page above to some extent, but I'm just guessing. - HTH
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
Drxenos
Posts: 209
Joined: Mon Jul 07, 2003 8:38 pm

Re: g++ support

Post by Drxenos »

Delfas wrote:A newbie question.

I guess my problem is that I don't have access to Windows compilers like VC++ or BC++. So, I think that my only option is to use g++ under Cygwin to build cross platform using Emacs.

Under XP, is it possible to configure TextPad to use g++? Or is Emacs my only option?


Appreciate your answers.
I use TextPad with g++ all the time, for windows (MingW), for MS-DOS (DJGPP), and for a Solaris hosted, g++ cross-compiler for Power-PC. The later works by making rexec calls to the host to compile and such.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Re: g++ support

Post by s_reynisson »

Could you pls post your TP tool configuration for the MingW compiler?
I'm about to brush up on my C++ skills and using MingW would be a
dream solution for portability reasons, not to mention TP! ;)
Drxenos wrote:I use TextPad with g++ all the time, for windows (MingW)
Then I open up and see
the person fumbling here is me
a different way to be
Frank Fesevur
Posts: 16
Joined: Fri Jun 13, 2003 12:46 pm
Location: The Netherlands

Post by Frank Fesevur »

It is described in the help: Index -> compiler -> regex for .... -> GNU C++

Regards,
Frank
Frank Fesevur
Dutch Translator
User avatar
Drxenos
Posts: 209
Joined: Mon Jul 07, 2003 8:38 pm

Re: g++ support

Post by Drxenos »

s_reynisson wrote:Could you pls post your TP tool configuration for the MingW compiler?
I'm about to brush up on my C++ skills and using MingW would be a
dream solution for portability reasons, not to mention TP! ;)
Drxenos wrote:I use TextPad with g++ all the time, for windows (MingW)

I don't configure my tools to call the compilers directly. I have to use too many and the resulting configuration would most likely be an unusable mess! I configure the tools to use the makefile, and make make (no pun) do all the work. So, I have tools that will build the "current file" via make filename.o; build "default" via make; etc. That way the tools don't have to worry about the actual compiler, its options, paths, etc.

The only problem I have is all the compilers' output for errors don't match. Still haven't got a good workaround for that, so I just set the RE to whatever compiler I am currently using most.

DrX
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

I'm clueless when it comes to that "environment" (MingW).
I have it set up under C:\Dev-Cpp, installed with Dev-C++ IDE, and
C:\Dev-Cpp\mingw32. The Dev-C++ IDE is a beta and I can't even get it
to compile hello world... Any hints welcome!

About that multi-comp-regex, did you try Xor? ie. (regex1)|(regex2)|(regex3)
Then I open up and see
the person fumbling here is me
a different way to be
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

s_reynisson wrote:About that multi-comp-regex, did you try Xor? ie. (regex1)|(regex2)|(regex3)
That would have to be something like

Code: Select all

...(val1_regex1|val1_regex2)...(val2_regex1|val2_regex2)
to get the captured substrings to be numbered the same, regardless of which of the alternative subexpressions matched. So it can only work if the required values (filename and line number) are in the same order in all versions.

(BTW, it's an or, not an xor. The regex (a|b) doesn't fail to match as a whole if both subexpressions a and b match.)
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Agreed, I had been reading the TP help file, "Matches either the expression to its left or its right." Sorry.
ben_josephs wrote:(BTW, it's an or, not an xor. The regex (a|b) doesn't fail to match as a whole if both subexpressions a and b match.)
Peeew! My mind is now officially contaminated! Serves me right for using regex engines that can use non-capturing brackets. :roll:
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
Drxenos
Posts: 209
Joined: Mon Jul 07, 2003 8:38 pm

Post by Drxenos »

s_reynisson wrote:I'm clueless when it comes to that "environment" (MingW).
I have it set up under C:\Dev-Cpp, installed with Dev-C++ IDE, and
C:\Dev-Cpp\mingw32. The Dev-C++ IDE is a beta and I can't even get it
to compile hello world... Any hints welcome!

About that multi-comp-regex, did you try Xor? ie. (regex1)|(regex2)|(regex3)
Setting of MingW is easy. Unlike Cygwin (which is great too!), you don't need to be in a "special" environment. With MingW, you can call the compiler, et. al. from the command line, just like you would in any other system (Linux, etc.). Just install it on your machine, and add the bin directory to your path.

One thing though, and it took my a LONG time to figure this out. If you don't use MSYS (MingW's shell) the make tool can fail when using file globbing and the files don't exist. For example, having a "clean" target in the makefile like such:

clean:
del *.o (or rm if you have it)

will fail if there are no *.o files. Adding a dash ("-") before the del helps, but if you have:
del *.o *.s (etc.)

Will not work because if there are no *.o files, the *.s will also not be deleted. A workaroung is the split it into multiple commands:
-del *.o
-del *.s

Instead, I either use MSYS (which is an excellent shell!) or use the make tool for the DOS version of GCC, DJGPP.


Hope this helps,

DrX
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

The MinGW Starter Guide mentions the MinIDE (Minimalist IDE for MinGW), did you try that as a make tool?
(In any case I've got cygwin installed on my system, guess I'll go with that to start off with.)
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
Drxenos
Posts: 209
Joined: Mon Jul 07, 2003 8:38 pm

Post by Drxenos »

s_reynisson wrote:The MinGW Starter Guide mentions the MinIDE (Minimalist IDE for MinGW), did you try that as a make tool?
(In any case I've got cygwin installed on my system, guess I'll go with that to start off with.)
What do I need with an IDE when I have TextPad? Seriously though, I think I've been spoiled by TextPad. Text editors built into IDEs seem so horrible now.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Hmm, at least look at the link ;)
MinIDE creates the necessary makefile(s) for your project and executes all the compiler commands for you. MinIDE does not come with a text editor, debugger, or resource-editor. However it can be configured to work with the editors of your own choosing.
From what I can understand, it's an IDE for make files.
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
Drxenos
Posts: 209
Joined: Mon Jul 07, 2003 8:38 pm

Post by Drxenos »

s_reynisson wrote:Hmm, at least look at the link ;)
MinIDE creates the necessary makefile(s) for your project and executes all the compiler commands for you. MinIDE does not come with a text editor, debugger, or resource-editor. However it can be configured to work with the editors of your own choosing.
From what I can understand, it's an IDE for make files.
I wasn't just being flippant. I have tried it (along with some other IDEs like DEV-C++). But I prefer to create my makefiles by hand. And the IDEs that do have editors, the editors can't hold a candle the TextPad. I think if TextPad could do things like interface with GDB, hyperlink definitions/declarations, and code collapsing it would be perfect.
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

So it piqued my curiosity. I say that this IDE has one of the most intuitive, kick-ass editors ever built.
Bullet point #2 "added a TextPad configuration to the .ini file, so you can double-click errors and TextPad will automatically display the file at line#." I thought it was funny too, s_reynisson.
I choose to fight with a sack of angry cats.
Post Reply