|
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
|