Mail Archives: djgpp/1996/11/20/14:44:12
I can't get the Standard Template Library priority_queue class to work
with DJGPP V2. Some other STL classes work fine, but when I try to
compile a program that uses a priority queue, I get weird errors.
Take this, for example:
// pqtest.cc
#include <stack>
#include <vector>
int main()
{
priority_queue< vector<int>, less<int> > pq;
return 0;
}
When I compile this with DJGPP V2 using the command
gcc -Wall -o pqtest.exe pqtest.cc -lstdcxx
I get the following error messages:
c:/djgpp/lang/cxx/heap.h: In function `void __push_heap_aux(
int *, int *, struct less<int>, int *)':
c:/djgpp/lang/cxx/heap.h:57: type unification failed for function
template `template <class RandomAccessIterator, class Distance,
class T> void __push_heap(RandomAccessIterator, Distance,
Distance, T)'
What is wrong, and how do I get a simple priority queue going?
Any help is appreciated.
Another thing: with the GNU Standard C++ Library that comes
with DJGPP we should do "#include <queue>" when using
queues. That is, or should be, a forwarding include file which
in turn includes 'queue.h'. However, there is no queue.h!
I have expanded all the ZIP files for GPP and LGP but it
doesn't exist. Is this an oversight by the library designers?
Regards,
Jere
- Raw text -