Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #645 > unrolled thread
| Started by | "Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> |
|---|---|
| First post | 2011-08-22 17:23 +0200 |
| Last post | 2011-08-22 18:50 +0100 |
| Articles | 5 on this page of 25 — 14 participants |
Back to article view | Back to comp.sys.acorn.programmer
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 2 of 2 — ← Prev page 1 [2]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2011-09-12 14:34 +0100 |
| Message-ID | <52119576a4chrisjohnson+news@spamcop.net> |
| In reply to | #717 |
In article <ff4b751152.Alex@bavariasound.chiemgau-net.de>, 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? Source files are normally simple text files. I assume StrongEd has some means of identifying them. I use Zap, and one way that guesses the filetype is to look whether the file is in a directory of c, h, s, etc. -- Chris Johnson
[toc] | [prev] | [next] | [standalone]
| From | Martin Wuerthner <spamtrap@mw-software.com> |
|---|---|
| Date | 2011-09-01 11:05 +0200 |
| Message-ID | <0d9fd20b52.martin@bach.planiverse.com> |
| In reply to | #680 |
In message <a584b90b52.bavariasound@chiemgau-net.de>
"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de>
wrote:
> 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?
You can place the sources and compiler output wherever you want. The
harddisc root is clearly not a good place, but I would not store
anything where !GCC is either. Best to have !GCC somewhere on its own
and your programming projects somewhere on their own.
All you need to do is to set the current directory before compiling.
The easiest way to do that is to have an Obey file (or even better, a
TaskObey file) in the directory containing your project, i.e., the
directory containing the "h", "c", "cpp" and "o" sub-directories. That
Obey file then sets the directory and starts compilation.
Dir <Obey$Dir>
... all the other commands for compiling
All names you pass to !GCC are treated as relative to the current
directory.
--
Martin
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | David Pitt <pittdj@pittdj.co.uk> |
|---|---|
| Date | 2011-08-22 16:52 +0100 |
| Message-ID | <ff93d10652.pittdj+@iyonix.home> |
| In reply to | #645 |
In message <66eece0652.noreply@chiemgau-net.de>
"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> wrote:
> 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.
I use Sams Teach Yourself C++ in 21 days. (Been using it for years!)
#include <iostream>
int main(void)
{
using namespace std;
cout << "Hello World\n" << endl;
return 0;
}
--
David Pitt
MessengerPro 6 on an ARMini running RISC OS 5
[toc] | [prev] | [next] | [standalone]
| From | Martin Wuerthner <spamtrap@mw-software.com> |
|---|---|
| Date | 2011-08-22 19:44 +0200 |
| Message-ID | <44d5db0652.martin@bach.planiverse.com> |
| In reply to | #645 |
In message <66eece0652.noreply@chiemgau-net.de>
"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de>
wrote:
> 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
Well, that should give a clue. Without the iostream header file the
following code cannot compile. Looks like you have not installed GCC
correctly. This works fine here with GCC 4.1.1.
> test.cpp:3: error: '::main' must return 'int'
The above is not correct C++. The standard requires 'main' to return
an 'int' value.
--
Martin
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | David Pitt <pittdj@pittdj.co.uk> |
|---|---|
| Date | 2011-08-22 18:50 +0100 |
| Message-ID | <7858dc0652.pittdj+@iyonix.home> |
| In reply to | #645 |
In message <66eece0652.noreply@chiemgau-net.de>
"Alexander Ausserstorfer" <bavariasound@chiemgau-net.de> wrote:
> 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
Take 2, the command to compile C++ is g++.
The source file 'test' shound be in a subdirectory called 'cpp'.
http://www.riscos.info/index.php/GCC_tutorial
--
David Pitt
MessengerPro 6 on an ARMini running RISC OS 5
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web