getting a build erro when compiling with CC on sun os

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

getting a build erro when compiling with CC on sun os

Mitesh Poojari
Hi ,

Need help.

I am getting build errors when trying to compile
QuantLib using
Compiler CC: Sun C++ 5.5 2003/03/12
on  a
SunOS idevel01 5.8 Generic_117350-26 sun4u sparc
SUNW,Ultra-Enterprise


So I reduced the library to build only Calender and
Daycounter.
Now have the corresponding QuantLib library .

But now when I try to build a simple test program
which has only has a Date class object.
The CC complier throws the following errors


/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/my_test>CC
test.cpp  
-I/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/include
-I/export/home/mpoojari/project/AA/quantlib/boost_1_33_1
-L/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib
-L/export/home/mpoojari/project/AA/quantlib/boost_1_33_1/stage/lib
 
-L/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.a
-lQuantLib
"/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/include/ql/config.hpp",
line 38: Warning (Anachronism): Attempt to redefine
M_PI without using #undef.
1 Warning(s) detected.
Undefined                       first referenced
 symbol                             in file
void*std::__node_alloc<true,0>::_M_allocate(unsigned)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::ios_base::_Loc_init::_Loc_init()
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
boost::basic_format<__type_0,__type_1,__type_2>&boost::io::detail::feed<char,std::char_traits<char>,std::allocator<char>,const
std::string
&>(boost::basic_format<__type_0,__type_1,__type_2>&,__type_3)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::_Rb_tree_node_base*std::_Rb_global<bool>::_Rebalance_for_erase(std::_Rb_tree_node_base*,std::_Rb_tree_node_base*&,std::_Rb_tree_node_base*&,std::_Rb_tree_node_base*&)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
int std::streambuf::_M_xsputnc(char,int)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
QuantLib::ExchangeRateManager::ExchangeRateManager()
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
int std::streambuf::xsputn(const char*,int)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
boost::basic_format<__type_0,__type_1,__type_2>&boost::io::detail::feed<char,std::char_traits<char>,std::allocator<char>,const
double&>(boost::basic_format<__type_0,__type_1,__type_2>&,__type_3)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::__Named_exception::__Named_exception #Nvariant
1(const std::string &)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::ostream
&QuantLib::detail::operator<<(std::ostream &,const
QuantLib::detail::percent_holder&)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
void
std::_Rb_global<bool>::_Rebalance(std::_Rb_tree_node_base*,std::_Rb_tree_node_base*&)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::ostream
&QuantLib::detail::operator<<(std::ostream &,const
QuantLib::detail::ordinal_holder&)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::_Rb_tree_node_base*std::_Rb_global<bool>::_M_increment(std::_Rb_tree_node_base*)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::locale::facet*std::locale::_M_use_facet(const
std::locale::id&)const
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::_Rb_tree_node_base*std::_Rb_global<bool>::_M_decrement(std::_Rb_tree_node_base*)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
void std::__stl_throw_length_error(const char*)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
void std::__stl_throw_out_of_range(const char*)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
void std::ios_base::_M_throw_failure()
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
QuantLib::ExchangeRate
QuantLib::ExchangeRateManager::lookup(const
QuantLib::Currency&,const
QuantLib::Currency&,QuantLib::Date,QuantLib::ExchangeRate::Type)const
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
int std::streambuf::xsgetn(char*,int)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
double QuantLib::Rounding::operator()(double)const  
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::ios_base::_Loc_init::~_Loc_init()
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
std::streambuf *std::streambuf::setbuf(char*,int)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
int std::streambuf::showmanyc()
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
void
std::__node_alloc<true,0>::_M_deallocate(void*,unsigned)
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.so
ld: fatal: Symbol referencing errors. No output
written to a.out
/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/my_test>




Here is the test program
----------
//#include <ql/quantlib.hpp>

#include <iostream.h>
#include <ql/date.hpp>
//#include <ql/exercise.hpp>
//#include <ql/DayCounters/all.hpp>
/*
#include <ql/DayCounters/actualactual.hpp>
#include <ql/DayCounters/one.hpp>
#include <ql/DayCounters/simpledaycounter.hpp>
*/

using namespace QuantLib;




main()
{
 //Date a(25, October, 1996);
 //Date b(31, December, 1996);
Date counter ;





}

----------

CC test.cpp  
-I/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/include
-I/export/home/mpoojari/project/AA/quantlib/boost_1_33_1
-L/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib
-L/export/home/mpoojari/project/AA/quantlib/boost_1_33_1/stage/lib
 
-L/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.a
-lQuantlib




-Mitesh

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


Reply | Threaded
Open this post in threaded view
|

Re: getting a build erro when compiling with CC on sun os

Mitesh Poojari

Using the following options to CC
 CC test.cpp  

-I/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/include

-I/export/home/mpoojari/project/AA/quantlib/boost_1_33_1

-L/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib

-L/export/home/mpoojari/project/AA/quantlib/boost_1_33_1/stage/lib
   
 
 -lQuantlib



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


Reply | Threaded
Open this post in threaded view
|

getting a build erro when compiling with CC on sun os

Mitesh Poojari
Hi all ,

I am facing a problem when building
the QuantLib on SunOS 5.8.
I am using CC compiler available in Sun ONE Studio 8.
CC version is : Sun C++ 5.5 2003/03/12.

Does any one know how to I can proceed ?


-Mitesh


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


Reply | Threaded
Open this post in threaded view
|

Re: getting a build erro when compiling with CC on sun os

eric ehlers
In reply to this post by Mitesh Poojari
Hi Mitesh,

> CC test.cpp
> -I/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/include
> -I/export/home/mpoojari/project/AA/quantlib/boost_1_33_1
> -L/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib
> -L/export/home/mpoojari/project/AA/quantlib/boost_1_33_1/stage/lib

> -L/export/home/mpoojari/project/AA/quantlib/QuantLib-0.3.12/stage/lib/libQuantLib.a

-L is used to specify a directory not the library itself.

> -lQuantlib

That should be -lQuantLib (case sensitive)

Regards,
Eric


Reply | Threaded
Open this post in threaded view
|

Re: getting a build erro when compiling with CC on sun os

Luigi Ballabio
In reply to this post by Mitesh Poojari

On 06/15/2006 04:24:47 PM, Mitesh Poojari wrote:
> I am getting build errors when trying to compile
> QuantLib using
> Compiler CC: Sun C++ 5.5 2003/03/12
> on  a
> SunOS idevel01 5.8 Generic_117350-26 sun4u sparc
> SUNW,Ultra-Enterprise

Mitesh,
        the missing symbols seem to be from the C++ standard library.  
I'm not familiar with Sun CC, but with gcc I would try adding -lstdc++  
to the compiler options.

Luigi


----------------------------------------

The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
-- Gilbert K. Chesterson