Re: error: 'comp' was not declared in this scope

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Eljay,

Thanks for reply. Using your proposed solution solved the 
problem of c and comp not being declared in scope. So, is it 
that the new gcc version does not allow directly using the 
protected variabled declared in parent class? (because that 
worked fine when I had gcc 3.4.3)

Also now I have new issues when I compile the program. I get the 
following linker errors:

/usr/local/lib/libbg.so: undefined reference to 
`std::__default_alloc_template<true, 0>::allocate(unsigned int)'
/usr/local/lib/libbg.so: undefined reference to 
`std::basic_streambuf<char, std::char_traits<char> 
>::_M_out_cur_move(long)'
/usr/local/lib/libbg.so: undefined reference to 
`std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Rep::_S_create(unsigned int, 
std::allocator<char> const&)'
/usr/local/lib/libbg.so: undefined reference to 
`std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_S_empty_rep_storage'
/usr/local/lib/libbg.so: undefined reference to 
`std::__default_alloc_template<true, 0>::deallocate(void*, 
unsigned int)'
collect2: ld returned 1 exit status

I am not sure why these are appearing. How can solve the above 
problems.

Divy. 

---------Included Message----------
>Date: 14-Feb-2007 07:23:38 -0500
>From: "John Love-Jensen" <eljay@xxxxxxxxx>
>To: "Divy Kanungo" <divyk@xxxxxxxxxxxxxx>, "MSX to GCC" <gcc-
help@xxxxxxxxxxx>
>Subject: Re: error: 'comp' was not declared in this scope
>
>Hi Divy,
>
>You might want to try adding this near the beginning of your 
Queue template
>class:
>
>protected:
>  using std::priority_queue< T, std::vector<T>, PLess<T> >::c;
>  using std::priority_queue< T, std::vector<T>, PLess<T> 
>::comp;
>
>HTH,
>--Eljay
>
>
>
---------End of Included Message----------



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux