I am trying to develop a block-diagramming / cross-refererncing GUI tool
for C projects’ code so that people can block-diagram the code of a
project and then conveniently see the code flow. I have found that if I
am to maintain or contribute to a 100 KLOC+ project, block-diagramming
and cross-referencing helps. The tool is being developed in PhAB (the
GUI). To build and walk the C tree I am using a component written by
someone else - this component has compiled with gcc 2.95 on FreeBSD and
worked properly and also on Linux and NetBSD. I have managed to compile
the code on QNX but when I execute it it craps out on cpp. Below are the
reported errors:
–>./ctree ctree.c
/usr/bin/cpp -DCTREE ctree.c ctree_pp
In file included from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/sys/platform.h:29: #error not configured for compiler
In file included from /usr/include/sys/platform.h:158,
from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/sys/platform.h:185,
from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/stdio.h:17,
from ctree.c:25:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/stdio.h:287,
from ctree.c:25:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/malloc.h:11,
from /usr/include/stdlib.h:25,
from ctree.c:27:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/malloc.h:70,
from /usr/include/stdlib.h:25,
from ctree.c:27:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/stdlib.h:28,
from ctree.c:27:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/stdlib.h:66,
from ctree.c:27:
/usr/include/_packpop.h:11: #error Compiler not supported
HERE3!!!---->ogd116@dezdemona-/home/ogd116/ctree_14/src
If the source code walked does not have for example #include <stdio.h>
which in turn includes platform.h and in turn _pack64.h and _packpop.h
→ everything works fine.
I have tried posting to the inn.qnx.com newsgroups but noone seems to
read those? Anyone knows how I can get in touch with QNX people willing
to help out?
I am trying to develop a block-diagramming / cross-refererncing GUI tool
for C projects’ code so that people can block-diagram the code of a
project and then conveniently see the code flow. I have found that if I
am to maintain or contribute to a 100 KLOC+ project, block-diagramming
and cross-referencing helps. The tool is being developed in PhAB (the
GUI). To build and walk the C tree I am using a component written by
someone else - this component has compiled with gcc 2.95 on FreeBSD and
worked properly and also on Linux and NetBSD. I have managed to compile
the code on QNX but when I execute it it craps out on cpp. Below are the
reported errors:
–>./ctree ctree.c
/usr/bin/cpp -DCTREE ctree.c ctree_pp
In file included from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/sys/platform.h:29: #error not configured for compiler
In file included from /usr/include/sys/platform.h:158,
from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/sys/platform.h:185,
from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/stdio.h:17,
from ctree.c:25:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/stdio.h:287,
from ctree.c:25:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/malloc.h:11,
from /usr/include/stdlib.h:25,
from ctree.c:27:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/malloc.h:70,
from /usr/include/stdlib.h:25,
from ctree.c:27:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/stdlib.h:28,
from ctree.c:27:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/stdlib.h:66,
from ctree.c:27:
/usr/include/_packpop.h:11: #error Compiler not supported
HERE3!!!---->ogd116@dezdemona-/home/ogd116/ctree_14/src
If the source code walked does not have for example #include <stdio.h
which in turn includes platform.h and in turn _pack64.h and _packpop.h
→ everything works fine.
The problem is that there are some defines that are set by the compiler,
and the includes rely on these for doing system/compiler specific stuff.
If you try
gcc -v -E ctree.c 1>/dev/null
you’ll see all the defines you need ctree to pass to cpp. Most of those
are set by the gcc specs file, /usr/lib/gcc-lib/ntox86/2.95.2/specs
You should not be calling cpp directly but instead cc, gcc or qcc.
Each of these front ends setups symbols that header files needs
to support various features.
“ogd116” <ogd116@mail.usask.ca> wrote in message
news:Voyager.010310095655.561166A@dezdemona…
Hello,
I am trying to develop a block-diagramming / cross-refererncing GUI tool
for C projects’ code so that people can block-diagram the code of a
project and then conveniently see the code flow. I have found that if I
am to maintain or contribute to a 100 KLOC+ project, block-diagramming
and cross-referencing helps. The tool is being developed in PhAB (the
GUI). To build and walk the C tree I am using a component written by
someone else - this component has compiled with gcc 2.95 on FreeBSD and
worked properly and also on Linux and NetBSD. I have managed to compile
the code on QNX but when I execute it it craps out on cpp. Below are the
reported errors:
–>./ctree ctree.c
/usr/bin/cpp -DCTREE ctree.c ctree_pp
In file included from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/sys/platform.h:29: #error not configured for compiler
In file included from /usr/include/sys/platform.h:158,
from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/sys/platform.h:185,
from /usr/include/stdio.h:14,
from ctree.c:25:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/stdio.h:17,
from ctree.c:25:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/stdio.h:287,
from ctree.c:25:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/malloc.h:11,
from /usr/include/stdlib.h:25,
from ctree.c:27:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/malloc.h:70,
from /usr/include/stdlib.h:25,
from ctree.c:27:
/usr/include/_packpop.h:11: #error Compiler not supported
In file included from /usr/include/stdlib.h:28,
from ctree.c:27:
/usr/include/_pack64.h:11: #error Compiler not supported
In file included from /usr/include/stdlib.h:66,
from ctree.c:27:
/usr/include/_packpop.h:11: #error Compiler not supported
HERE3!!!---->ogd116@dezdemona-/home/ogd116/ctree_14/src
If the source code walked does not have for example #include <stdio.h
which in turn includes platform.h and in turn _pack64.h and _packpop.h
→ everything works fine.
I have tried posting to the inn.qnx.com newsgroups but noone seems to
read those? Anyone knows how I can get in touch with QNX people willing
to help out?
gcc -E helped. Everything works now. Thank you all and sorry for asking before thinking
Best regards,
Ognen
Previously, Julian Kinraid wrote in comp.os.qnx:
Hi ogd116,
The problem is that there are some defines that are set by the compiler,
and the includes rely on these for doing system/compiler specific stuff.
If you try
gcc -v -E ctree.c 1>/dev/null
you’ll see all the defines you need ctree to pass to cpp. Most of those
are set by the gcc specs file, /usr/lib/gcc-lib/ntox86/2.95.2/specs