Compile errors in Boost files, suspect GCC version problem
Hi,
I am trying to port my linux application which used the Boost library to
windows using cygwin.
When i tried to compile I am getting the following errors
../Thread/pasync.cxx:1: warning: -fPIC ignored for target (all code is
position independent)
../Thread/patomic.cxx:1: warning: -fPIC ignored for target (all code is
position independent)
../Thread/pmsgq.cxx:1: warning: -fPIC ignored for target (all code is
position independent)
../Thread/pmtxtable.cxx:1: warning: -fPIC ignored for target (all code is
position independent)
../Thread/prwlock.cxx:1: warning: -fPIC ignored for target (all code is
position independent)
../Thread/psemaphore.cxx:1: warning: -fPIC ignored for target (all code is
position independent)
../Thread/pthread.cxx:1: warning: -fPIC ignored for target (all code is
position independent)
../../boost_1_33_1/boost/shared_ptr.hpp: In member function `T*
boost::shared_ptr<T>::operator->() const [with T = LCEllaLogSource]':
../include/Shutdown.h:263: instantiated from here
../../boost_1_33_1/boost/shared_ptr.hpp:253: error: `assert' undeclared
(first use this function)
../../boost_1_33_1/boost/shared_ptr.hpp:253: error: (Each undeclared
identifier is reported only once for each function it appears in.)
../../boost_1_33_1/boost/shared_ptr.hpp: In member function `T*
boost::shared_ptr<T>::operator->() const [with T =
linx::LCShutdownObserver]':
../include/SubjectObserver.h:344: instantiated from `void
GenericSubject
Hi,
Let me attempt helping you (as I do not have your setup).
On Wed, May 14, 2008 at 9:35 PM, jadooo
../../boost_1_33_1/boost/shared_ptr.hpp: In member function `T* boost::shared_ptr<T>::operator->() const [with T = LCEllaLogSource]': ../include/Shutdown.h:263: instantiated from here ../../boost_1_33_1/boost/shared_ptr.hpp:253: error: `assert' undeclared
This is the first error you are seeing (ignore the fpic stuff). Open the file "../../boost_1_33_1/boost/shared_ptr.hpp" in an editor and see if "boost/assert.hpp" is included. If not, there is a problem. I am seeing the 1.35 code and it has. If the file in included, open the "boost/assert.hpp" and see under what conditions "assert.h" is included. It gets included only if you have not defined both BOOST_DISABLE_ASSERTS and BOOST_ENABLE_ASSERT_HANDLER anywhere in your makefiles or build or source. Alternatively, include "assert.h" before including any boost header. -dky -- Contents reflect my personal views only!
Hi,
Thanks for the interest.
Now I found that compiler is not using /usr/include in the include path.
How to set it??
I tried to set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH to point to
/usr/include , but still it is not taking the files from /usr/include.
Is it that in Cygwin we need to do something else.
Regards
Vipin
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of dhruva
Sent: 15 May 2008 04:07
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compile errors in Boost files,suspect GCC
version problem
Hi,
Let me attempt helping you (as I do not have your setup).
On Wed, May 14, 2008 at 9:35 PM, jadooo
../../boost_1_33_1/boost/shared_ptr.hpp: In member function `T* boost::shared_ptr<T>::operator->() const [with T = LCEllaLogSource]': ../include/Shutdown.h:263: instantiated from here ../../boost_1_33_1/boost/shared_ptr.hpp:253: error: `assert' undeclared
This is the first error you are seeing (ignore the fpic stuff). Open the file "../../boost_1_33_1/boost/shared_ptr.hpp" in an editor and see if "boost/assert.hpp" is included. If not, there is a problem. I am seeing the 1.35 code and it has. If the file in included, open the "boost/assert.hpp" and see under what conditions "assert.h" is included. It gets included only if you have not defined both BOOST_DISABLE_ASSERTS and BOOST_ENABLE_ASSERT_HANDLER anywhere in your makefiles or build or source. Alternatively, include "assert.h" before including any boost header. -dky -- Contents reflect my personal views only! _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately.
Hi,
On Thu, May 15, 2008 at 2:29 PM, Nair, Vipin
Now I found that compiler is not using /usr/include in the include path. How to set it??
I tried to set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH to point to /usr/include , but still it is not taking the files from /usr/include.
1. Set the environmental variable INCLUDE=/usr/include:$INCLUDE. GCC picks it from there by default. 2. Or, use "gcc -I/usr/include". If you are using a makefile and it has CC=gcc, replace it with CC="gcc -I/usr/include". -dhruva -- Contents reflect my personal views only!
Now I found that compiler is not using /usr/include in the include
Hi,
I tried setting the variables u said but still it is not using it.
I tried to just compile the file which is throwing error, but that also
doesn't work. Have attached the build output. Please check and let me
know
If I am doing something really bad.
If I directly insert the include path like
'#include "/usr/include/assert.h" ', I get rid of the assert error, but
will get stuck in some other files which is dependent on some other
files.
Some silly thing, which I am not able to find.
Also, may be a point that I am using a make file which is developed
using Eclipse in linux. Will that contribute to this??
Regards
Vipin
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of dhruva
Sent: 15 May 2008 11:51
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compile errors in Boost files,suspect GCC
version problem
Hi,
On Thu, May 15, 2008 at 2:29 PM, Nair, Vipin
How to set it??
I tried to set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH to point to /usr/include , but still it is not taking the files from /usr/include.
1. Set the environmental variable INCLUDE=/usr/include:$INCLUDE. GCC picks it from there by default. 2. Or, use "gcc -I/usr/include". If you are using a makefile and it has CC=gcc, replace it with CC="gcc -I/usr/include". -dhruva -- Contents reflect my personal views only! _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately.
Hi, This is not a BOOST problem. I can still help but maybe we should take this offline. If you can send me the Makefile, that will be great. I can just add the entry and send it back to you. -dhruva -- Contents reflect my personal views only!
participants (3)
-
dhruva
-
jadooo
-
Nair, Vipin