Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #645 > unrolled thread

A !GCC-compiler question (C++)

Started by"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de>
First post2011-08-22 17:23 +0200
Last post2011-08-22 18:50 +0100
Articles 20 on this page of 25 — 14 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  A !GCC-compiler question (C++) "Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> - 2011-08-22 17:23 +0200
    Re: A !GCC-compiler question (C++) Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-08-22 17:48 +0200
      Re: A !GCC-compiler question (C++) Martin Wuerthner <spamtrap@mw-software.com> - 2011-08-22 20:00 +0200
        Re: A !GCC-compiler question (C++) Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-08-24 05:42 +0200
          Re: A !GCC-compiler question (C++) Nick Roberts <tigger@orpheusinternet.co.uk> - 2011-08-24 17:52 +0100
            Re: A !GCC-compiler question (C++) Gazza <usenet@garethlock.com> - 2011-09-03 09:16 -0700
      Re: A !GCC-compiler question (C++) "Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> - 2011-08-23 07:41 +0200
        Re: A !GCC-compiler question (C++) Martin Wuerthner <spamtrap@mw-software.com> - 2011-08-23 12:20 +0200
          Re: A !GCC-compiler question (C++) Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-08-23 16:57 +0100
            Re: A !GCC-compiler question (C++) David Pitt <news2@pittdj.co.uk> - 2011-08-23 17:57 +0100
            Re: A !GCC-compiler question (C++) "Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> - 2011-08-24 16:28 +0200
              Re: A !GCC-compiler question (C++) Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-08-26 07:44 +0200
                Re: A !GCC-compiler question (C++) Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-08-26 10:31 +0100
                  Re: A !GCC-compiler question (C++) Jim Lesurf <jcgl@audiomisc.co.uk> - 2011-08-27 11:40 +0100
                Re: A !GCC-compiler question (C++) Rainer Schubert <dl6hbo@dl6hbo.inka.de> - 2011-08-26 18:54 +0200
              Re: A !GCC-compiler question (C++) "Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> - 2011-09-01 05:30 +0100
                Re: A !GCC-compiler question (C++) Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> - 2011-09-01 09:48 +0100
                  Re: A !GCC-compiler question (C++) Alexander Ausserstorfer <bavariasound@chiemgau-net.de> - 2011-09-12 08:43 +0100
                    Re: A !GCC-compiler question (C++) Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> - 2011-09-12 13:12 +0100
                      Re: A !GCC-compiler question (C++) Gavin Wraith <gavin@wra1th.plus.com> - 2011-09-12 14:47 +0100
                    Re: A !GCC-compiler question (C++) Chris Johnson <chrisjohnson+news@spamcop.net> - 2011-09-12 14:34 +0100
                Re: A !GCC-compiler question (C++) Martin Wuerthner <spamtrap@mw-software.com> - 2011-09-01 11:05 +0200
    Re: A !GCC-compiler question (C++) David Pitt <pittdj@pittdj.co.uk> - 2011-08-22 16:52 +0100
    Re: A !GCC-compiler question (C++) Martin Wuerthner <spamtrap@mw-software.com> - 2011-08-22 19:44 +0200
    Re: A !GCC-compiler question (C++) David Pitt <pittdj@pittdj.co.uk> - 2011-08-22 18:50 +0100

Page 1 of 2  [1] 2  Next page →


#645 — A !GCC-compiler question (C++)

From"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de>
Date2011-08-22 17:23 +0200
SubjectA !GCC-compiler question (C++)
Message-ID<66eece0652.noreply@chiemgau-net.de>
Hello,

using Microsoft Visual Studio following programme works properly:

#include <iostream>
using namespace std;
void main()
{
  cout << "Hello World!" << endl;
}

Using the GCC-compiler (4.1.1) for RISC OS doesn't work:

*gcc cpp.test -o test
test.cpp:1:20: error: iostream: No such file or directory
test.cpp:3: error: '::main' must return 'int'
test.cpp: In function 'int main()':
test.cpp:5: error: 'cout' was not declared in this scope
test.cpp:5: error: 'endl' was not declared in this scope

Can me anybody give a short hint what's wrong? Reading the help-file of
!GCC wasn't just such helpful for me yet.

Thanks,

Alex'

-- 
Alexander Ausserstorfer, Bavaria
RISC OS since 1994
http://home.chiemgau-net.de/ausserstorfer/

[toc] | [next] | [standalone]


#646

FromRick Murray <heyrickmail-usenet@yahoo.co.uk>
Date2011-08-22 17:48 +0200
Message-ID<4e527a31$0$18803$ba4acef3@reader.news.orange.fr>
In reply to#645
On 22/08/2011 17:23, Alexander Ausserstorfer wrote:

> #include<iostream>

Shouldn't that be <iostream.h> ?



> using namespace std;
> void main()
> {
>    cout<<  "Hello World!"<<  endl;
> }
>
> Using the GCC-compiler (4.1.1) for RISC OS doesn't work:
>
> *gcc cpp.test -o test
> test.cpp:1:20: error: iostream: No such file or directory

> test.cpp:3: error: '::main' must return 'int'

Seems a strange requirement...


> test.cpp:5: error: 'cout' was not declared in this scope
> test.cpp:5: error: 'endl' was not declared in this scope

Logical if iostream wasn't 'found'.


Totally untested (I'd have written it in plain C, myself ;) ), try this:

--8<--------
#include <iostream.h>

using namespace std;

int  main(void)
{
    cout << "Hello World!" << endl;

    return 0;
}
--8<--------


Best wishes,

Rick.

[toc] | [prev] | [next] | [standalone]


#650

FromMartin Wuerthner <spamtrap@mw-software.com>
Date2011-08-22 20:00 +0200
Message-ID<583fdd0652.martin@bach.planiverse.com>
In reply to#646
In message <4e527a31$0$18803$ba4acef3@reader.news.orange.fr>
          Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:

> On 22/08/2011 17:23, Alexander Ausserstorfer wrote:

>> #include<iostream>

> Shouldn't that be <iostream.h> ?

No. The C++ STL headers should be included without a ".h" suffix.

>> using namespace std;
>> void main()
>> {
>>    cout<<  "Hello World!"<<  endl;
>> }
>>
>> Using the GCC-compiler (4.1.1) for RISC OS doesn't work:
>>
>> *gcc cpp.test -o test
>> test.cpp:1:20: error: iostream: No such file or directory

>> test.cpp:3: error: '::main' must return 'int'

> Seems a strange requirement...

Not really strange. The return value is required as the exit code for 
the calling OS. In contrast to C, which merely has undefined behaviour 
for "void main()", the C++ actually enforces an 'int' return type.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

[toc] | [prev] | [next] | [standalone]


#660

FromRick Murray <heyrickmail-usenet@yahoo.co.uk>
Date2011-08-24 05:42 +0200
Message-ID<4e547316$0$30777$ba4acef3@reader.news.orange.fr>
In reply to#650
On 22/08/2011 20:00, Martin Wuerthner wrote:

> No. The C++ STL headers should be included without a ".h" suffix.

Ah... Okay.


>> Seems a strange requirement...
> Not really strange. The return value is required as the exit code for
> the calling OS.

I guess this makes sense with the methodology of a strongly command-line 
based environment, like... say... the bash shell... but is a return code 
as relevant for a multitasking GUI program? [*]


* - WinMain() doesn't count, as it pretty much throws you right in to a
     message retrieve/dispatch loop, thus implying some of the boring
     grunt work (vaguely equivalent to Wimp_Initialise) has been done
     automagically prior to WinMain being called, and the return code is
     either zero or the result of the WM_QUIT message; which is roughly
     equivalent to dropping out on poll code UserMessage Quit and letting
     the library code (or Windows itself?) deal with the subsequent need
     for Wimp_Closedown. Either way, main() != WinMain().


Best wishes,

Rick.

[toc] | [prev] | [next] | [standalone]


#665

FromNick Roberts <tigger@orpheusinternet.co.uk>
Date2011-08-24 17:52 +0100
Message-ID<2ab3de0752.tigger@bc63.orpheusinternet.co.uk>
In reply to#660
In message <4e547316$0$30777$ba4acef3@reader.news.orange.fr>
       Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:

> On 22/08/2011 20:00, Martin Wuerthner wrote:
> 
> > No. The C++ STL headers should be included without a ".h" suffix.
> 
> Ah... Okay.
> 
> 
> >> Seems a strange requirement...
> > Not really strange. The return value is required as the exit code for
> > the calling OS.
> 
> I guess this makes sense with the methodology of a strongly
> command-line  based environment, like... say... the bash shell... but
> is a return code  as relevant for a multitasking GUI program? [*]

Even GUI programs may need to signal a failure to the calling script.
And even if it isn't useful for GUIs, you still need to be have a
consistant interface. After all, the compiler can't tell whether the
program is intended to be invoked from the command line or from a GUI.

-- 
Nick Roberts           tigger @ orpheusinternet.co.uk           

Hanlon's Razor: Never attribute to malice that which
can be adequately explained by stupidity.

[toc] | [prev] | [next] | [standalone]


#687

FromGazza <usenet@garethlock.com>
Date2011-09-03 09:16 -0700
Message-ID<b02862f9-0b85-48ed-804b-e544ee2d7e04@et6g2000vbb.googlegroups.com>
In reply to#665
On Aug 24, 5:52 pm, Nick Roberts <tig...@orpheusinternet.co.uk> wrote:
>
> Even GUI programs may need to signal a failure to the calling script.
> And even if it isn't useful for GUIs, you still need to be have a
> consistant interface. After all, the compiler can't tell whether the
> program is intended to be invoked from the command line or from a GUI.
>
> --

To add to that, some programs can be called from either the command
line, or from within a script, for automated batch jobs, or they can
be run from inside a GUI and can provide a user friendly front-end.
All in one executable. So in the first case, you'd need to return a
reason code, whereas the second, it would be pretty much uneeded.

[toc] | [prev] | [next] | [standalone]


#651

From"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de>
Date2011-08-23 07:41 +0200
Message-ID<bc6d1d0752.noreply@chiemgau-net.de>
In reply to#646
In der Nachricht
 <4e527a31$0$18803$ba4acef3@reader.news.orange.fr>
 Rick Murray <heyrickmail-usenet@yahoo.co.uk>
 hat geschrieben:

> On 22/08/2011 17:23, Alexander Ausserstorfer wrote:
>
> > #include<iostream>
>
> Shouldn't that be <iostream.h> ?

So far as I understood it, libraries for C include the ending '.h'
whereas libraries for C++ come without.

> > using namespace std;
> > void main()
> > {
> >    cout<<  "Hello World!"<<  endl;
> > }
> >
> > Using the GCC-compiler (4.1.1) for RISC OS doesn't work:
> >
> > *gcc cpp.test -o test
> > test.cpp:1:20: error: iostream: No such file or directory
>
> > test.cpp:3: error: '::main' must return 'int'
>
> Seems a strange requirement...
>
>
> > test.cpp:5: error: 'cout' was not declared in this scope
> > test.cpp:5: error: 'endl' was not declared in this scope
>
> Logical if iostream wasn't 'found'.

That is the point. !GCC seems to missing it, but why? Where should it
be?

Thanks in advance,

A.

-- 
Alexander Ausserstorfer, Bavaria
RISC OS since 1994
http://home.chiemgau-net.de/ausserstorfer/

[toc] | [prev] | [next] | [standalone]


#655

FromMartin Wuerthner <spamtrap@mw-software.com>
Date2011-08-23 12:20 +0200
Message-ID<5e07370752.martin@bach.planiverse.com>
In reply to#651
In message <bc6d1d0752.noreply@chiemgau-net.de>
          "Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> 
wrote:

> In der Nachricht
>  <4e527a31$0$18803$ba4acef3@reader.news.orange.fr>
>  Rick Murray <heyrickmail-usenet@yahoo.co.uk>
>  hat geschrieben:

>> On 22/08/2011 17:23, Alexander Ausserstorfer wrote:

>>> test.cpp:5: error: 'cout' was not declared in this scope
>>> test.cpp:5: error: 'endl' was not declared in this scope
>>
>> Logical if iostream wasn't 'found'.

> That is the point. !GCC seems to missing it, but why? Where should it
> be?

The C++ headers are in !GCC.include.c++.4/1/1, but you should not 
normally need to know. Are you sure you have downloaded all the 
components and installed them according to the instructions, in 
particular the archive with a name starting "GCC4-C++"?

Sometimes problems are caused by using an outdated version of 
SparkFS/SparkPlug to unpack modern distribution archives.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

[toc] | [prev] | [next] | [standalone]


#657

FromTheo Markettos <theom+news@chiark.greenend.org.uk>
Date2011-08-23 16:57 +0100
Message-ID<PYm*-npLt@news.chiark.greenend.org.uk>
In reply to#655
Martin Wuerthner <spamtrap@mw-software.com> wrote:
> The C++ headers are in !GCC.include.c++.4/1/1, but you should not 
> normally need to know. Are you sure you have downloaded all the 
> components and installed them according to the instructions, in 
> particular the archive with a name starting "GCC4-C++"?

If you compile with 'g++', the C++ headers are found.  If you compile with
'gcc', they aren't.  (Tested on Linux).  I'm not entirely sure why this
should be: I thought the idea was everything should be compiled with 'gcc',
and that figures out what language you are compiling from the extension. 
But it doesn't quite work.

Theo

[toc] | [prev] | [next] | [standalone]


#658

FromDavid Pitt <news2@pittdj.co.uk>
Date2011-08-23 17:57 +0100
Message-ID<9bi4ffFjpdU1@mid.individual.net>
In reply to#657
On 2011-08-23 15:57:49 +0000, Theo Markettos said:

> Martin Wuerthner <spamtrap@mw-software.com> wrote:
>> The C++ headers are in !GCC.include.c++.4/1/1, but you should not
>> normally need to know. Are you sure you have downloaded all the
>> components and installed them according to the instructions, in
>> particular the archive with a name starting "GCC4-C++"?
> 
> If you compile with 'g++', the C++ headers are found.  If you compile with
> 'gcc', they aren't.  (Tested on Linux).  I'm not entirely sure why this
> should be: I thought the idea was everything should be compiled with 'gcc',
> and that figures out what language you are compiling from the extension.
> But it doesn't quite work.

There is some sort of explanation at:-
http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Invoking-G_002b_002b.html#Invoking-G_002b_002b 


And in a simpler form at :-
http://www.riscos.info/index.php/GCC_tutorial#C.2B.2B

-- 
David Pitt

[toc] | [prev] | [next] | [standalone]


#664

From"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de>
Date2011-08-24 16:28 +0200
Message-ID<be81d10752.noreply@chiemgau-net.de>
In reply to#657
In der Nachricht
 <PYm*-npLt@news.chiark.greenend.org.uk>
 Theo Markettos <theom+news@chiark.greenend.org.uk>
 hat geschrieben:

> Martin Wuerthner <spamtrap@mw-software.com> wrote:
> > The C++ headers are in !GCC.include.c++.4/1/1, but you should not
> > normally need to know. Are you sure you have downloaded all the
> > components and installed them according to the instructions, in
> > particular the archive with a name starting "GCC4-C++"?
>
> If you compile with 'g++', the C++ headers are found.  If you compile with
> 'gcc', they aren't.  (Tested on Linux).  I'm not entirely sure why this
> should be: I thought the idea was everything should be compiled with 'gcc',
> and that figures out what language you are compiling from the extension.
> But it doesn't quite work.

Yep, compiling by g++ works. This is the solution. I couldn't find any
hint in the documentation of !GCC. Is there a good book which fits to
GCC, C/C++ and - maybe - ARM or RISC OS?

A.

-- 
Alexander Ausserstorfer, Bavaria
RISC OS since 1994
http://home.chiemgau-net.de/ausserstorfer/

[toc] | [prev] | [next] | [standalone]


#666

FromRick Murray <heyrickmail-usenet@yahoo.co.uk>
Date2011-08-26 07:44 +0200
Message-ID<4e5732c2$0$18797$ba4acef3@reader.news.orange.fr>
In reply to#664
On 24/08/2011 16:28, Alexander Ausserstorfer wrote:

>> If you compile with 'g++', the C++ headers are found.  If you compile with
>> 'gcc', they aren't.  (Tested on Linux).
> Yep, compiling by g++ works. This is the solution.

This is bizarre. I could have sworn that the OSD's build scripts invoke 
"arm-linux-gcc" to compile [*]. There's an "arm-linux-g++" too, and 
something else like "arm-linux-egp" (?). The latter two (g++ and the 
other) are symlinked to point to gcc.

Sorry, can't be more specific. Got the browser running so don't have 
enough physical memory to fire up Portable Ubuntu to wander around the 
makefiles.


Here's a question for Linux people - are "g++" and "gcc" different 
files, or is it the same with different personalities?


Best wishes,

Rick.

* - it's an ARM compiler suite/toolchain running in Linux x86

[toc] | [prev] | [next] | [standalone]


#668

FromTheo Markettos <theom+news@chiark.greenend.org.uk>
Date2011-08-26 10:31 +0100
Message-ID<OYm*dODLt@news.chiark.greenend.org.uk>
In reply to#666
Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote:
> This is bizarre. I could have sworn that the OSD's build scripts invoke 
> "arm-linux-gcc" to compile [*]. There's an "arm-linux-g++" too, and 
> something else like "arm-linux-egp" (?). The latter two (g++ and the 
> other) are symlinked to point to gcc.
> 
> Here's a question for Linux people - are "g++" and "gcc" different 
> files, or is it the same with different personalities?

Ubuntu:

$ ls /usr/bin/g*
lrwxrwxrwx 1 root root       7 2010-08-28 16:45 /usr/bin/g++ -> g++-4.4
-rwxr-xr-x 1 root root  220428 2010-03-26 22:43 /usr/bin/g++-4.4
lrwxrwxrwx 1 root root       7 2010-08-28 14:52 /usr/bin/gcc -> gcc-4.4
-rwxr-xr-x 1 root root  220428 2010-03-26 22:46 /usr/bin/gcc-4.4

Looking at the executable size, they appear to be the same, but they aren't:

$ md5sum /usr/bin/g++-4.4 
3da32fa481c394b2b58273faaf9355c9  /usr/bin/g++-4.4
$ md5sum /usr/bin/gcc-4.4 
2da6387b1d12110fba46fe47fea9326a  /usr/bin/gcc-4.4

You can compile C++ with 'gcc', you just need to add additional flags to
point to the libraries (eg -lstdc++).  g++ does that for you.

Theo

[toc] | [prev] | [next] | [standalone]


#673

FromJim Lesurf <jcgl@audiomisc.co.uk>
Date2011-08-27 11:40 +0100
Message-ID<520948296ajcgl@audiomisc.co.uk>
In reply to#668
In article <OYm*dODLt@news.chiark.greenend.org.uk>, Theo Markettos
<theom+news@chiark.greenend.org.uk> wrote:


> You can compile C++ with 'gcc', you just need to add additional flags to
> point to the libraries (eg -lstdc++).  g++ does that for you.

FWIW I was surprised when I started using gcc that you needed to use the
'-l' when issuing the gcc command to compile and link a program that used
the math library. I'd taken for granted - from using the 'Acorn' compiler,
I suppose - that just having the include in the program would be enough.
So, easy for one's assumptions to turn out to be unfounded. :-)

Slainte,

Jim

-- 
Electronics  http://www.st-and.ac.uk/~www_pa/Scots_Guide/intro/electron.htm
Armstrong Audio  http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc  http://www.audiomisc.co.uk/index.html

[toc] | [prev] | [next] | [standalone]


#669

FromRainer Schubert <dl6hbo@dl6hbo.inka.de>
Date2011-08-26 18:54 +0200
Message-ID<lqjoas.eqy@dl6hbo.inka.de.UUCP>
In reply to#666
Am 26.08.2011 07:44, schrieb Rick Murray:
> Here's a question for Linux people - are "g++" and "gcc" different
> files, or is it the same with different personalities?

On my Debian Linux system they are differen files:
lrwxrwxrwx 1 root root 7  9. Jul 19:54 /usr/bin/g++ -> g++-4.6
root@dl6hbo:~# l /usr/bin/gcc
lrwxrwxrwx 1 root root 7  9. Jul 19:54 /usr/bin/gcc -> gcc-4.6
root@dl6hbo:~# l /usr/bin/gcc-4.6
-rwxr-xr-x 1 root root 302340 24. Aug 17:10 /usr/bin/gcc-4.6
root@dl6hbo:~# l /usr/bin/g++-4.6
-rwxr-xr-x 1 root root 302340 24. Aug 17:09 /usr/bin/g++-4.6

Regards,
Rainer

[toc] | [prev] | [next] | [standalone]


#680

From"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de>
Date2011-09-01 05:30 +0100
Message-ID<a584b90b52.bavariasound@chiemgau-net.de>
In reply to#664
In message <be81d10752.noreply@chiemgau-net.de>
          "Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> wrote:

>Yep, compiling by g++ works. This is the solution. I couldn't find any
>hint in the documentation of !GCC. Is there a good book which fits to
>GCC, C/C++ and - maybe - ARM or RISC OS?

By the way: Compiling pressing the "running-man"-button in StrongEd also
works just for C-code. I think it depends on the mode file I have
installed. Is there a mode file for C++ anywhere around (I couldn't find
yet).

General, I prefer to work with !GCC and !StrongEd instead of Microsoft
Visual Studio (MSVS). I just have the problem, that all of my files
(source etc.) for !GCC are spread all around of my harddisc what may
lead one day into a mess. Results of !GCC are stored in the root
directory of my harddisc which contains also the directories h, c and
cpp now. Is there a reasonable way to move this things into the
directory which contains !GCC?

A.

-- 
Alexander Ausserstorfer, Bavaria
RISC OS since 1994
http://home.chiemgau-net.de/ausserstorfer/

[toc] | [prev] | [next] | [standalone]


#681

FromJeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk>
Date2011-09-01 09:48 +0100
Message-ID<mpro.lqu5s1001qgtp02js@wingsandbeaks.org.uk.invalid>
In reply to#680
Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:

> By the way: Compiling pressing the "running-man"-button in StrongEd also
> works just for C-code. I think it depends on the mode file I have
> installed. Is there a mode file for C++ anywhere around (I couldn't find
> yet).

Whether there is or not, there's nothing to stop you making a copy of the C
mode definition, then changing the specification of which files are edited
using it (to select your C+++ files rather than plain C ones, perhaps on a
project-by-project basis), then changing the modefile itself to issue the
commands you want.

-- 
Jeremy C B Nicoll - my opinions are my own.

Email sent to my from-address will be deleted. Instead, please reply
to newsreplyaaa@wingsandbeaks.org.uk replacing "aaa" by "284".  

[toc] | [prev] | [next] | [standalone]


#717

FromAlexander Ausserstorfer <bavariasound@chiemgau-net.de>
Date2011-09-12 08:43 +0100
Message-ID<ff4b751152.Alex@bavariasound.chiemgau-net.de>
In reply to#681
In message <mpro.lqu5s1001qgtp02js@wingsandbeaks.org.uk.invalid>
          Jeremy Nicoll - news posts
          <jn.nntp.scrap007@wingsandbeaks.org.uk>
          wrote:

>Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
>
>> By the way: Compiling pressing the "running-man"-button in StrongEd also
>> works just for C-code. I think it depends on the mode file I have
>> installed. Is there a mode file for C++ anywhere around (I couldn't find
>> yet).
>
>Whether there is or not, there's nothing to stop you making a copy of the C
>mode definition, then changing the specification of which files are edited
>using it (to select your C+++ files rather than plain C ones, perhaps on a
>project-by-project basis), then changing the modefile itself to issue the
>commands you want.

Well, there is a lot to do now. Is there a specific file type for c or
cpp source files so that StrongEd can open and applies the right mode to
it automatically?

A.

-- 
http://home.chiemgau-net.de/ausserstorfer/

[toc] | [prev] | [next] | [standalone]


#718

FromJeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk>
Date2011-09-12 13:12 +0100
Message-ID<mpro.lresla001peeb02mc@wingsandbeaks.org.uk.invalid>
In reply to#717
Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:

> Well, there is a lot to do now. Is there a specific file type for c or
> cpp source files so that StrongEd can open and applies the right mode to
> it automatically?

I don't know if people use a filetype or not; StrongEd's ModeWhen files
contain various defintions of what files should be processed in a particular
mode.  For example, SE will pattern-match on portions of file or directory
names.

If you're using SE a lot and don't know this sort of thing you should
perhaps join the SE support mail list; subscribe to that by sending an email
to:

  StrongED+subscribe@Torrens.org.uk


-- 
Jeremy C B Nicoll - my opinions are my own.

Email sent to my from-address will be deleted. Instead, please reply
to newsreplyaaa@wingsandbeaks.org.uk replacing "aaa" by "284".  

[toc] | [prev] | [next] | [standalone]


#720

FromGavin Wraith <gavin@wra1th.plus.com>
Date2011-09-12 14:47 +0100
Message-ID<8cae961152.wra1th@wra1th.plus.com>
In reply to#718
In message <mpro.lresla001peeb02mc@wingsandbeaks.org.uk.invalid>
          Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> wrote:

> Alexander Ausserstorfer <bavariasound@chiemgau-net.de> wrote:
> 
> > Well, there is a lot to do now. Is there a specific file type for c or
> > cpp source files so that StrongEd can open and applies the right mode to
> > it automatically?
> 
> I don't know if people use a filetype or not; StrongEd's ModeWhen files
> contain various defintions of what files should be processed in a particular
> mode.  For example, SE will pattern-match on portions of file or directory
> names.

The important bit of the default C ModeWhen-file says that it uses C mode
for files in directories called c or h or for shift-doubleclick on
files with names ending in /c or /h.

-- 
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.sys.acorn.programmer


csiph-web