Re: [GiNaC-list] problems with cstring and string
ok i will try this i did install cln locally and configured with something like export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CLN/lib ./configure --prefix=/home/trobens/programs/ginac/install CLN_CFLAGS=-I$CLN/include/cln/ CLN_LIBS=-L$CLN/lib/ CPPFLAGS=-I$CLN/include/ LDFLAGS=-L$CLN/lib/ LIBS=-lcln mb this causes the problem ?? On Thu, 9 Feb 2017, Mario Prausa wrote:
On 09.02.2017 03:51, Tania Robens wrote:
In file included from /home/trobens/programs/cln/install/include/cln/string.h:9:0, from /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/cstring:42, from class_info.h:27, from registrar.h:26, from basic.h:29, from ex.h:26, from expair.h:26, from expairseq.h:26, from add.h:26, from add.cpp:23:
This looks suspicious. The ginac file "class_info.h" includes the standard C++ library file "cstring" which includes the CLN file "string.h". In the standard C libray there is also a file by the name "string.h" which is what "cstring" wants to include.
I think the problem is the order of your include pathes. The pathes to the standard libraries should go before any other libraries (in that case CLN).
Mario
------------------------------------------------------------------------- Dr. habil. Tania Robens Michigan State University Department of Physics and Astronomy 567 Wilson Road East Lansing, MI 48824 USA
On 02/09/2017 10:56 PM, Tania Robens wrote:
./configure --prefix=/home/trobens/programs/ginac/install CLN_CFLAGS=-I$CLN/include/cln/ CLN_LIBS=-L$CLN/lib/ CPPFLAGS=-I$CLN/include/ LDFLAGS=-L$CLN/lib/ LIBS=-lcln
Ah, -I$CLN/include/cln/ makes it pick up the files in that directory! But the CLN headers should always be included a la <cln/cln.h>, never as <cln.h>. And, as Mario Prausa suggested, there is a conflict between std <string.h> and <cln/string.h>. -richy. -- Richard B. Kreckel <http://in.terlu.de/~kreckel/>
indeed, this solved the problem !!!!! tania On Thu, 9 Feb 2017, Richard B. Kreckel wrote:
On 02/09/2017 10:56 PM, Tania Robens wrote:
./configure --prefix=/home/trobens/programs/ginac/install CLN_CFLAGS=-I$CLN/include/cln/ CLN_LIBS=-L$CLN/lib/ CPPFLAGS=-I$CLN/include/ LDFLAGS=-L$CLN/lib/ LIBS=-lcln
Ah, -I$CLN/include/cln/ makes it pick up the files in that directory! But the CLN headers should always be included a la <cln/cln.h>, never as <cln.h>. And, as Mario Prausa suggested, there is a conflict between std <string.h> and <cln/string.h>.
-richy. -- Richard B. Kreckel <http://in.terlu.de/~kreckel/> _______________________________________________ GiNaC-list mailing list GiNaC-list@ginac.de https://www.cebix.net/mailman/listinfo/ginac-list
------------------------------------------------------------------------- Dr. habil. Tania Robens Michigan State University Department of Physics and Astronomy 567 Wilson Road East Lansing, MI 48824 USA
I think the option CLN_CFLAGS=-I$CLN/include/cln/ should read CLN_CFLAGS=-I$CLN/include/ All the CLN headers are referred to by "cln/...." in ginac. So you should not specify this subdirectory. Then the files "string.h" and "cln/string.h" shouldn't be confused anymore. Mario On 09.02.2017 22:56, Tania Robens wrote:
ok i will try this
i did install cln locally and configured with something like
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CLN/lib
./configure --prefix=/home/trobens/programs/ginac/install CLN_CFLAGS=-I$CLN/include/cln/ CLN_LIBS=-L$CLN/lib/ CPPFLAGS=-I$CLN/include/ LDFLAGS=-L$CLN/lib/ LIBS=-lcln
mb this causes the problem ??
On Thu, 9 Feb 2017, Mario Prausa wrote:
On 09.02.2017 03:51, Tania Robens wrote:
In file included from /home/trobens/programs/cln/install/include/cln/string.h:9:0, from /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/cstring:42, from class_info.h:27, from registrar.h:26, from basic.h:29, from ex.h:26, from expair.h:26, from expairseq.h:26, from add.h:26, from add.cpp:23:
This looks suspicious. The ginac file "class_info.h" includes the standard C++ library file "cstring" which includes the CLN file "string.h". In the standard C libray there is also a file by the name "string.h" which is what "cstring" wants to include.
I think the problem is the order of your include pathes. The pathes to the standard libraries should go before any other libraries (in that case CLN).
Mario
------------------------------------------------------------------------- Dr. habil. Tania Robens Michigan State University Department of Physics and Astronomy 567 Wilson Road East Lansing, MI 48824 USA
participants (3)
-
Mario Prausa
-
Richard B. Kreckel
-
Tania Robens