Could anybody tell me how to enable g++ in phAB (when I try to generate code I get only ntox86-gcc option available).
Thanks,
Adam
daman <daman@poczta.fm> wrote:
Could anybody tell me how to enable g++ in phAB (when I try to generate code I get only ntox86-gcc option available).
Thanks,
Adam
Edit your makefile and use QCC instead of qcc
Colin Burgess <cburgess@qnx.com> wrote:
daman <> daman@poczta.fm> > wrote:
Could anybody tell me how to enable g++ in phAB (when I try to generate code I get only ntox86-gcc option available).Edit your makefile and use QCC instead of qcc
Uh… You can do that, but the recommended way is to give your source
files a “cc”, “cpp”, or “C” extension. PhAB and make should notice it.
\
Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.
Wojtek Lerch <wojtek@qnx.com> wrote:
Colin Burgess <> cburgess@qnx.com> > wrote:
daman <> daman@poczta.fm> > wrote:
Could anybody tell me how to enable g++ in phAB (when I try to generate code I get only ntox86-gcc option available).Edit your makefile and use QCC instead of qcc
Uh… You can do that, but the recommended way is to give your source
files a “cc”, “cpp”, or “C” extension. PhAB and make should notice it.
Yes, but you still need to indicate to the link line that your
project is a C++ project, at least if you want exceptions to work,
and the stdc++ lib to be linked in.
What is the gimick to get exceptions to work? They won’t work for me, not
even the simplest example.
I know my code is OK. I’ve been coding with exceptions for 6 years now.
Colin Burgess <cburgess@qnx.com> wrote in message
news:8rapnf$4fe$2@nntp.qnx.com…
Wojtek Lerch <> wojtek@qnx.com> > wrote:
Colin Burgess <> cburgess@qnx.com> > wrote:
daman <> daman@poczta.fm> > wrote:
Could anybody tell me how to enable g++ in phAB (when I try to
generate code I get only ntox86-gcc option available).Edit your makefile and use QCC instead of qcc
Uh… You can do that, but the recommended way is to give your source
files a “cc”, “cpp”, or “C” extension. PhAB and make should notice it.Yes, but you still need to indicate to the link line that your
project is a C++ project, at least if you want exceptions to work,
and the stdc++ lib to be linked in.
Ok, it depends on whether you are using qcc or g++.
For qcc, it will compile/link with exceptions by default. It its
not working, then you are probably not linking correctly. You
have to tell qcc that the object files are C++ object files, eg
qcc -Vgcc_ntox86 -c main.cc
qcc -Vgcc_ntox86 -lang-c++ -o main main.o
or
QCC -Vgcc_ntox86 -o main main.o
For g++, exceptions are off by default. To enable them, you
must pass -fexceptions to both the compile and link lines.
g++ -fexceptions -c main.cc
g++ -fexceptions -o main main.o
Bill at Sierra Design <BC@sierradesign.com> wrote:
What is the gimick to get exceptions to work? They won’t work for me, not
even the simplest example.I know my code is OK. I’ve been coding with exceptions for 6 years now.
Colin Burgess <> cburgess@qnx.com> > wrote in message
news:8rapnf$4fe$> 2@nntp.qnx.com> …
Wojtek Lerch <> wojtek@qnx.com> > wrote:
Colin Burgess <> cburgess@qnx.com> > wrote:
daman <> daman@poczta.fm> > wrote:
Could anybody tell me how to enable g++ in phAB (when I try to
generate code I get only ntox86-gcc option available).Edit your makefile and use QCC instead of qcc
Uh… You can do that, but the recommended way is to give your source
files a “cc”, “cpp”, or “C” extension. PhAB and make should notice it.Yes, but you still need to indicate to the link line that your
project is a C++ project, at least if you want exceptions to work,
and the stdc++ lib to be linked in.