From: harsh g. <mer...@li...> - 2011-05-21 10:41:07
|
I needed to use the openc++ parser for an application that i was developing. The platform for use is Ubuntu Linux 10.04. Basically what i need is a c++ parser and openc++ seemed to be a worthy candidate. however on running the wrapper example i get the following error, /usr/include/wchar.h:220: parse error before `"wcschr"' /usr/include/stdlib.h:525: parse error before `"at_quick_exit"' /usr/include/c++/4.4/bits/cpp_type_traits.h:99: parse error before `>' /usr/include/c++/4.4/bits/cpp_type_traits.h:104: parse error before `template' /usr/include/c++/4.4/ext/type_traits.h:37: parse error before `__gnu_cxx' /usr/include/c++/4.4/ext/type_traits.h:174: parse error before `+' /usr/include/c++/4.4/ext/type_traits.h:186: parse error before `+' /usr/include/c++/4.4/ext/type_traits.h:199: parse error before `+' /usr/include/c++/4.4/ext/numeric_traits.h:37: parse error before `__gnu_cxx' /usr/include/c++/4.4/ext/numeric_traits.h:63: parse error before `template' occ: too many errors Please suggest what i can do to correct this error. Alternatively if you could suggest some other way of developing a wrapper for openc++, where i could get the parse tree of a cpp file programmatically then it would be a great help. I tried printing out the parse tree using the -s arguement and by supressing preprocessing then it works fine (on the terminal). Harsh Gupta |
From: Pascal J. B. <pj...@in...> - 2011-05-21 11:22:17
|
harsh gupta <mer...@li...> writes: > I needed to use the openc++ parser for an application that i was developing. The platform for use is Ubuntu Linux 10.04. Basically what i need is a c++ parser and openc++ seemed to be a worthy candidate. > > however on running the wrapper example i get the following error, > > /usr/include/wchar.h:220: parse error before `"wcschr"' > /usr/include/stdlib.h:525: parse error before `"at_quick_exit"' > /usr/include/c++/4.4/bits/cpp_type_traits.h:99: parse error before `>' > /usr/include/c++/4.4/bits/cpp_type_traits.h:104: parse error before `template' > /usr/include/c++/4.4/ext/type_traits.h:37: parse error before `__gnu_cxx' > /usr/include/c++/4.4/ext/type_traits.h:174: parse error before `+' > /usr/include/c++/4.4/ext/type_traits.h:186: parse error before `+' > /usr/include/c++/4.4/ext/type_traits.h:199: parse error before `+' > /usr/include/c++/4.4/ext/numeric_traits.h:37: parse error before `__gnu_cxx' > /usr/include/c++/4.4/ext/numeric_traits.h:63: parse error before `template' > occ: too many errors > > Please suggest what i can do to correct this error. Alternatively if > you could suggest some other way of developing a wrapper for openc++, > where i could get the parse tree of a cpp file programmatically then > it would be a great help. > > I tried printing out the parse tree using the -s arguement and by > supressing preprocessing then it works fine (on the terminal). AFAIK, you may either use an older compiler. I'd guess gcc 3.3 would work. Or you may update the openc++ parser so it can parse the new C++ implemented by gcc 4.4. -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}. |
From: harsh g. <mer...@li...> - 2011-05-21 11:26:12
|
> From: pj...@in... > To: mer...@li... > CC: ope...@li... > Subject: Re: [Opencxx-users] compiling on linux. > Date: Sat, 21 May 2011 13:16:28 +0200 > > harsh gupta <mer...@li...> writes: > > > I needed to use the openc++ parser for an application that i was developing. The platform for use is Ubuntu Linux 10.04. Basically what i need is a c++ parser and openc++ seemed to be a worthy candidate. > > > > however on running the wrapper example i get the following error, > > > > /usr/include/wchar.h:220: parse error before `"wcschr"' > > /usr/include/stdlib.h:525: parse error before `"at_quick_exit"' > > /usr/include/c++/4.4/bits/cpp_type_traits.h:99: parse error before `>' > > /usr/include/c++/4.4/bits/cpp_type_traits.h:104: parse error before `template' > > /usr/include/c++/4.4/ext/type_traits.h:37: parse error before `__gnu_cxx' > > /usr/include/c++/4.4/ext/type_traits.h:174: parse error before `+' > > /usr/include/c++/4.4/ext/type_traits.h:186: parse error before `+' > > /usr/include/c++/4.4/ext/type_traits.h:199: parse error before `+' > > /usr/include/c++/4.4/ext/numeric_traits.h:37: parse error before `__gnu_cxx' > > /usr/include/c++/4.4/ext/numeric_traits.h:63: parse error before `template' > > occ: too many errors > > > > Please suggest what i can do to correct this error. Alternatively if > > you could suggest some other way of developing a wrapper for openc++, > > where i could get the parse tree of a cpp file programmatically then > > it would be a great help. > > > > I tried printing out the parse tree using the -s arguement and by > > supressing preprocessing then it works fine (on the terminal). > > AFAIK, you may either use an older compiler. I'd guess gcc 3.3 would work. > > Or you may update the openc++ parser so it can parse the new C++ > implemented by gcc 4.4. > > -- i downloaded the latest release from the opencxx downloads page. How do i get the updated code for the gcc 4.4 implementation Harsh Gupta > __Pascal Bourguignon__ http://www.informatimago.com/ > A bad day in () is better than a good day in {}. |
From: Grzegorz J. <ja...@ac...> - 2011-05-21 11:24:57
|
Hi Harsh, OpenC++ maitenance ceased around gcc version 3.x (perhaps 3.3 as Pascal points out). OpenC++ does not handle certain template constructs that are present in the standard headers of the library distributed with gcc beyond that version -- most likely this is where your problem comes from. Going back to earlier gcc seems like the only quick solution. BR Greg On Sat, May 21, 2011 at 12:28 PM, harsh gupta <mer...@li...> wrote: > I needed to use the openc++ parser for an application that i was > developing. The platform for use is Ubuntu Linux 10.04. Basically what i > need is a c++ parser and openc++ seemed to be a worthy candidate. > > however on running the wrapper example i get the following error, > > /usr/include/wchar.h:220: parse error before `"wcschr"' > /usr/include/stdlib.h:525: parse error before `"at_quick_exit"' > /usr/include/c++/4.4/bits/cpp_type_traits.h:99: parse error before `>' > /usr/include/c++/4.4/bits/cpp_type_traits.h:104: parse error before > `template' > /usr/include/c++/4.4/ext/type_traits.h:37: parse error before `__gnu_cxx' > /usr/include/c++/4.4/ext/type_traits.h:174: parse error before `+' > /usr/include/c++/4.4/ext/type_traits.h:186: parse error before `+' > /usr/include/c++/4.4/ext/type_traits.h:199: parse error before `+' > /usr/include/c++/4.4/ext/numeric_traits.h:37: parse error before > `__gnu_cxx' > /usr/include/c++/4.4/ext/numeric_traits.h:63: parse error before `template' > occ: too many errors > > > Please suggest what i can do to correct this error. Alternatively if you > could suggest some other way of developing a wrapper for openc++, where i > could get the parse tree of a cpp file programmatically then it would be a > great help. > > I tried printing out the parse tree using the -s arguement and by > supressing preprocessing then it works fine (on the terminal). > > > Harsh Gupta > > > > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > |
From: harsh g. <mer...@li...> - 2011-05-21 11:32:00
|
hi Greg, I dont need to parse the headers, i just need to parse the programs written in c plus plus. My application just requires a parse tree of the c plus plus file. Is it possible to build a wrapper for the parser in openc++? Please share some pointers. Harsh Gupta Date: Sat, 21 May 2011 13:24:50 +0200 Subject: Re: [Opencxx-users] compiling on linux. From: ja...@ac... To: mer...@li... CC: ope...@li... Hi Harsh, OpenC++ maitenance ceased around gcc version 3.x (perhaps 3.3 as Pascal points out). OpenC++ does not handle certain template constructs that are present in the standard headers of the library distributed with gcc beyond that version -- most likely this is where your problem comes from. Going back to earlier gcc seems like the only quick solution. BR Greg On Sat, May 21, 2011 at 12:28 PM, harsh gupta <mer...@li...> wrote: I needed to use the openc++ parser for an application that i was developing. The platform for use is Ubuntu Linux 10.04. Basically what i need is a c++ parser and openc++ seemed to be a worthy candidate. however on running the wrapper example i get the following error, /usr/include/wchar.h:220: parse error before `"wcschr"' /usr/include/stdlib.h:525: parse error before `"at_quick_exit"' /usr/include/c++/4.4/bits/cpp_type_traits.h:99: parse error before `>' /usr/include/c++/4.4/bits/cpp_type_traits.h:104: parse error before `template' /usr/include/c++/4.4/ext/type_traits.h:37: parse error before `__gnu_cxx' /usr/include/c++/4.4/ext/type_traits.h:174: parse error before `+' /usr/include/c++/4.4/ext/type_traits.h:186: parse error before `+' /usr/include/c++/4.4/ext/type_traits.h:199: parse error before `+' /usr/include/c++/4.4/ext/numeric_traits.h:37: parse error before `__gnu_cxx' /usr/include/c++/4.4/ext/numeric_traits.h:63: parse error before `template' occ: too many errors Please suggest what i can do to correct this error. Alternatively if you could suggest some other way of developing a wrapper for openc++, where i could get the parse tree of a cpp file programmatically then it would be a great help. I tried printing out the parse tree using the -s arguement and by supressing preprocessing then it works fine (on the terminal). Harsh Gupta ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Opencxx-users mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/opencxx-users |
From: Stefan S. <se...@sy...> - 2011-05-21 11:44:40
|
On 2011-05-21 06:28, harsh gupta wrote: > I needed to use the openc++ parser for an application that i was > developing. The platform for use is Ubuntu Linux 10.04. Basically what > i need is a c++ parser and openc++ seemed to be a worthy candidate. The OpenC++ parser has some sever limitations, which have become quite apparent as changes and improvements have been applied to libstdc++, making the two incompatible. At this point I would suggest trying out CLang (http://clang.llvm.org/) as a C++ parser, as it has matured quite a bit over the last year. I'm pretty sure there are packages for clang and llvm available for Ubuntu. Good luck ! Stefan -- ...ich hab' noch einen Koffer in Berlin... |
From: harsh g. <mer...@li...> - 2011-05-22 10:49:49
|
I noticed that ubuntu has a package for clang that functions perfectly. By reading the documentation , i deduce that it is possible to get a Ptree of a express specified as a string. however i ran into a bit of a problem. While occ works fine if i call it via the command line , but when i include the headers , it gives me a segmentation fault. My code is : #include<iostream>#include<openc++/parser/PtreeArray.h> int main(){ std::cout<<"i am here"<<std::endl; Opencxx::PtreeArray a;} and the command i used to compile it is:g++ -g parse.cpp -shared /usr/lib/libocc.so however the line i am here is not printed. and the seg fault occurs before that. The stack trace is : (gdb) rStarting program: /home/kartikeya/temp/a.out Program received signal SIGSEGV, Segmentation fault.0x00000001 in ?? ()(gdb) bt#0 0x00000001 in ?? () Please point out the mistake. Thanks in advance, Harsh Gupta > Date: Sat, 21 May 2011 07:17:52 -0400 > From: se...@sy... > To: ope...@li... > Subject: Re: [Opencxx-users] compiling on linux. > > On 2011-05-21 06:28, harsh gupta wrote: > > I needed to use the openc++ parser for an application that i was > > developing. The platform for use is Ubuntu Linux 10.04. Basically what > > i need is a c++ parser and openc++ seemed to be a worthy candidate. > > The OpenC++ parser has some sever limitations, which have become quite > apparent as changes and improvements have been applied to libstdc++, > making the two incompatible. > > At this point I would suggest trying out CLang (http://clang.llvm.org/) > as a C++ parser, as it has matured quite a bit over the last year. I'm > pretty sure there are packages for clang and llvm available for Ubuntu. > > Good luck ! > > Stefan > > > -- > > ...ich hab' noch einen Koffer in Berlin... > > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users |
From: Grzegorz J. <ja...@ac...> - 2011-05-22 10:57:35
|
On Sun, May 22, 2011 at 12:49 PM, harsh gupta <mer...@li...> wrote: > I noticed that ubuntu has a package for clang that functions perfectly. > By reading the documentation , i deduce that it is possible to get a Ptree > of a express specified as a string. > > however i ran into a bit of a problem. While occ works fine if i call it > via the command line , but when i include the headers , it gives me a > segmentation fault. > Try to reproduce with static linking, a wild gues would be you are running into some problems with dynamic linking. Greg > > My code is : > > #include<iostream> > #include<openc++/parser/PtreeArray.h> > > int main() > { > std::cout<<"i am here"<<std::endl; > Opencxx::PtreeArray a; > } > > and the command i used to compile it is: > g++ -g parse.cpp -shared /usr/lib/libocc.so > > however the line i am here is not printed. and the seg fault occurs before > that. The stack trace is : > > (gdb) r > Starting program: /home/kartikeya/temp/a.out > > Program received signal SIGSEGV, Segmentation fault. > 0x00000001 in ?? () > (gdb) bt > #0 0x00000001 in ?? () > > Please point out the mistake. > > > Thanks in advance, > Harsh Gupta > > > > > > Date: Sat, 21 May 2011 07:17:52 -0400 > > From: se...@sy... > > To: ope...@li... > > > Subject: Re: [Opencxx-users] compiling on linux. > > > > On 2011-05-21 06:28, harsh gupta wrote: > > > I needed to use the openc++ parser for an application that i was > > > developing. The platform for use is Ubuntu Linux 10.04. Basically what > > > i need is a c++ parser and openc++ seemed to be a worthy candidate. > > > > The OpenC++ parser has some sever limitations, which have become quite > > apparent as changes and improvements have been applied to libstdc++, > > making the two incompatible. > > > > At this point I would suggest trying out CLang (http://clang.llvm.org/) > > as a C++ parser, as it has matured quite a bit over the last year. I'm > > pretty sure there are packages for clang and llvm available for Ubuntu. > > > > Good luck ! > > > > Stefan > > > > > > -- > > > > ...ich hab' noch einen Koffer in Berlin... > > > > > > > ------------------------------------------------------------------------------ > > What Every C/C++ and Fortran developer Should Know! > > Read this article and learn how Intel has extended the reach of its > > next-generation tools to help Windows* and Linux* C/C++ and Fortran > > developers boost performance applications - including clusters. > > http://p.sf.net/sfu/intel-dev2devmay > > _______________________________________________ > > Opencxx-users mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > |
From: harsh g. <mer...@li...> - 2011-05-22 11:24:45
|
On compiling with g++ parse.cpp -dynamic /usr/lib/libocc.so the program runs correctly. However it prints out a couple of warnings:g++ parse.cpp -dynamic /usr/lib/libocc.so cc1plus: warning: unrecognized gcc debugging option: ncc1plus: warning: unrecognized gcc debugging option: mcc1plus: warning: unrecognized gcc debugging option: icc1plus: warning: unrecognized gcc debugging option: cparse.cpp:1: warning: The C++ parser does not support -dy, option ignored Any idea why these are coming up? Harsh Gupta Date: Sun, 22 May 2011 12:57:27 +0200 Subject: Re: [Opencxx-users] compiling on linux. From: ja...@ac... To: mer...@li... CC: ope...@li... On Sun, May 22, 2011 at 12:49 PM, harsh gupta <mer...@li...> wrote: I noticed that ubuntu has a package for clang that functions perfectly. By reading the documentation , i deduce that it is possible to get a Ptree of a express specified as a string. however i ran into a bit of a problem. While occ works fine if i call it via the command line , but when i include the headers , it gives me a segmentation fault. Try to reproduce with static linking, a wild gues would be you are running into some problems with dynamic linking. Greg My code is : #include<iostream> #include<openc++/parser/PtreeArray.h> int main() { std::cout<<"i am here"<<std::endl; Opencxx::PtreeArray a; } and the command i used to compile it is: g++ -g parse.cpp -shared /usr/lib/libocc.so however the line i am here is not printed. and the seg fault occurs before that. The stack trace is : (gdb) rStarting program: /home/kartikeya/temp/a.out Program received signal SIGSEGV, Segmentation fault.0x00000001 in ?? ()(gdb) bt #0 0x00000001 in ?? () Please point out the mistake. Thanks in advance, Harsh Gupta > Date: Sat, 21 May 2011 07:17:52 -0400 > From: se...@sy... > To: ope...@li... > Subject: Re: [Opencxx-users] compiling on linux. > > On 2011-05-21 06:28, harsh gupta wrote: > > I needed to use the openc++ parser for an application that i was > > developing. The platform for use is Ubuntu Linux 10.04. Basically what > > i need is a c++ parser and openc++ seemed to be a worthy candidate. > > The OpenC++ parser has some sever limitations, which have become quite > apparent as changes and improvements have been applied to libstdc++, > making the two incompatible. > > At this point I would suggest trying out CLang (http://clang.llvm.org/) > as a C++ parser, as it has matured quite a bit over the last year. I'm > pretty sure there are packages for clang and llvm available for Ubuntu. > > Good luck ! > > Stefan > > > -- > > ...ich hab' noch einen Koffer in Berlin... > > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Opencxx-users mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/opencxx-users |
From: Grzegorz J. <ja...@ac...> - 2011-05-22 11:25:28
|
On Sun, May 22, 2011 at 1:12 PM, harsh gupta <mer...@li...> wrote: > On compiling with > g++ parse.cpp -dynamic /usr/lib/libocc.so > (1) Your g++ is not interpretting '-dynamic' as an option, it reads '-dy -n -a -m -i -c' (2) Your are not getting the static linking right -- you need to be linking with .a or .o file. Look whether you have libocc.a, if not, build it and link against it. Make sure to build it with -g for debugging symbols. BR Greg > > the program runs correctly. However it prints out a couple of warnings: > g++ parse.cpp -dynamic /usr/lib/libocc.so > cc1plus: warning: unrecognized gcc debugging option: n > cc1plus: warning: unrecognized gcc debugging option: m > cc1plus: warning: unrecognized gcc debugging option: i > cc1plus: warning: unrecognized gcc debugging option: c > parse.cpp:1: warning: The C++ parser does not support -dy, option ignored > > Any idea why these are coming up? > > Harsh Gupta > > > > > ------------------------------ > Date: Sun, 22 May 2011 12:57:27 +0200 > > Subject: Re: [Opencxx-users] compiling on linux. > From: ja...@ac... > To: mer...@li... > CC: ope...@li... > > > > On Sun, May 22, 2011 at 12:49 PM, harsh gupta <mer...@li...> wrote: > > I noticed that ubuntu has a package for clang that functions perfectly. > By reading the documentation , i deduce that it is possible to get a Ptree > of a express specified as a string. > > however i ran into a bit of a problem. While occ works fine if i call it > via the command line , but when i include the headers , it gives me a > segmentation fault. > > > Try to reproduce with static linking, a wild gues would be you are running > into some problems with dynamic linking. > > Greg > > > > > My code is : > > #include<iostream> > #include<openc++/parser/PtreeArray.h> > > int main() > { > std::cout<<"i am here"<<std::endl; > Opencxx::PtreeArray a; > } > > and the command i used to compile it is: > g++ -g parse.cpp -shared /usr/lib/libocc.so > > however the line i am here is not printed. and the seg fault occurs before > that. The stack trace is : > > (gdb) r > Starting program: /home/kartikeya/temp/a.out > > Program received signal SIGSEGV, Segmentation fault. > 0x00000001 in ?? () > (gdb) bt > #0 0x00000001 in ?? () > > Please point out the mistake. > > > Thanks in advance, > Harsh Gupta > > > > > > Date: Sat, 21 May 2011 07:17:52 -0400 > > From: se...@sy... > > To: ope...@li... > > > Subject: Re: [Opencxx-users] compiling on linux. > > > > On 2011-05-21 06:28, harsh gupta wrote: > > > I needed to use the openc++ parser for an application that i was > > > developing. The platform for use is Ubuntu Linux 10.04. Basically what > > > i need is a c++ parser and openc++ seemed to be a worthy candidate. > > > > The OpenC++ parser has some sever limitations, which have become quite > > apparent as changes and improvements have been applied to libstdc++, > > making the two incompatible. > > > > At this point I would suggest trying out CLang (http://clang.llvm.org/) > > as a C++ parser, as it has matured quite a bit over the last year. I'm > > pretty sure there are packages for clang and llvm available for Ubuntu. > > > > Good luck ! > > > > Stefan > > > > > > -- > > > > ...ich hab' noch einen Koffer in Berlin... > > > > > > > ------------------------------------------------------------------------------ > > What Every C/C++ and Fortran developer Should Know! > > Read this article and learn how Intel has extended the reach of its > > next-generation tools to help Windows* and Linux* C/C++ and Fortran > > developers boost performance applications - including clusters. > > http://p.sf.net/sfu/intel-dev2devmay > > _______________________________________________ > > Opencxx-users mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > > |
From: harsh g. <mer...@li...> - 2011-05-22 11:37:19
|
Thanks a ton greg. Removing the dynamic option solved the problem.. Harsh Gupta Date: Sun, 22 May 2011 13:25:20 +0200 Subject: Re: [Opencxx-users] compiling on linux. From: ja...@ac... To: mer...@li... CC: ope...@li... On Sun, May 22, 2011 at 1:12 PM, harsh gupta <mer...@li...> wrote: On compiling with g++ parse.cpp -dynamic /usr/lib/libocc.so (1) Your g++ is not interpretting '-dynamic' as an option, it reads '-dy -n -a -m -i -c' (2) Your are not getting the static linking right -- you need to be linking with .a or .o file. Look whether you have libocc.a, if not, build it and link against it. Make sure to build it with -g for debugging symbols. BR Greg the program runs correctly. However it prints out a couple of warnings: g++ parse.cpp -dynamic /usr/lib/libocc.so cc1plus: warning: unrecognized gcc debugging option: ncc1plus: warning: unrecognized gcc debugging option: m cc1plus: warning: unrecognized gcc debugging option: icc1plus: warning: unrecognized gcc debugging option: cparse.cpp:1: warning: The C++ parser does not support -dy, option ignored Any idea why these are coming up? Harsh Gupta Date: Sun, 22 May 2011 12:57:27 +0200 Subject: Re: [Opencxx-users] compiling on linux. From: ja...@ac... To: mer...@li... CC: ope...@li... On Sun, May 22, 2011 at 12:49 PM, harsh gupta <mer...@li...> wrote: I noticed that ubuntu has a package for clang that functions perfectly. By reading the documentation , i deduce that it is possible to get a Ptree of a express specified as a string. however i ran into a bit of a problem. While occ works fine if i call it via the command line , but when i include the headers , it gives me a segmentation fault. Try to reproduce with static linking, a wild gues would be you are running into some problems with dynamic linking. Greg My code is : #include<iostream> #include<openc++/parser/PtreeArray.h> int main() { std::cout<<"i am here"<<std::endl; Opencxx::PtreeArray a; } and the command i used to compile it is: g++ -g parse.cpp -shared /usr/lib/libocc.so however the line i am here is not printed. and the seg fault occurs before that. The stack trace is : (gdb) rStarting program: /home/kartikeya/temp/a.out Program received signal SIGSEGV, Segmentation fault.0x00000001 in ?? ()(gdb) bt #0 0x00000001 in ?? () Please point out the mistake. Thanks in advance, Harsh Gupta > Date: Sat, 21 May 2011 07:17:52 -0400 > From: se...@sy... > To: ope...@li... > Subject: Re: [Opencxx-users] compiling on linux. > > On 2011-05-21 06:28, harsh gupta wrote: > > I needed to use the openc++ parser for an application that i was > > developing. The platform for use is Ubuntu Linux 10.04. Basically what > > i need is a c++ parser and openc++ seemed to be a worthy candidate. > > The OpenC++ parser has some sever limitations, which have become quite > apparent as changes and improvements have been applied to libstdc++, > making the two incompatible. > > At this point I would suggest trying out CLang (http://clang.llvm.org/) > as a C++ parser, as it has matured quite a bit over the last year. I'm > pretty sure there are packages for clang and llvm available for Ubuntu. > > Good luck ! > > Stefan > > > -- > > ...ich hab' noch einen Koffer in Berlin... > > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Opencxx-users mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/opencxx-users |