LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   got errors when compile libpdf++ (https://www.linuxquestions.org/questions/linux-software-2/got-errors-when-compile-libpdf-436659/)

caspervn 04-19-2006 03:07 AM

got errors when compile libpdf++
 
Hi,
I'm using Fedora 2. When I compile libpdf++ (C++ library for pdf) for my learning and got these errors

Code:

c++ -DPACKAGE=\"libpdfdoc\" -DVERSION=\"0.0.3\" -DHAVE_DLFCN_H=1 -DHAVE_LIBZ=1 -DHAVE_JPEG=1 -I. -I. -I../../src -I/usr/include/boost -DNDEBUG -Wall -O2 -c Array.cc  -fPIC -DPIC -o .libs/Array.lo
In file included from Array.cc:27:
Array.hh:74: error: ISO C++ forbids declaration of `indirect_iterator_generator
  ' with no type
Array.hh:74: error: template-id `
  indirect_iterator_generator<__gnu_cxx::__normal_iterator<const
  boost::shared_ptr<pdf::core::CObject>*,
  std::vector<boost::shared_ptr<pdf::core::CObject>,
  std::allocator<boost::shared_ptr<pdf::core::CObject> > > >,
  pdf::core::CObject, const pdf::core::CObject&,
  std::random_access_iterator_tag, const pdf::core::CObject*>' used as a
  declarator
Array.hh:74: error: syntax error before `::' token
Array.hh:77: error: ISO C++ forbids declaration of `iterator' with no type
Array.hh:77: error: syntax error before `::' token
Array.hh:78: error: `int' is not an aggregate type
Array.hh:78: error: ISO C++ forbids declaration of `reference' with no type
Array.hh:78: error: syntax error before `;' token
Array.hh:79: error: `int' is not an aggregate type
Array.hh:79: error: ISO C++ forbids declaration of `reference' with no type
Array.hh:79: error: syntax error before `;' token
Array.cc: In copy constructor `pdf::core::CArray::CArray(const
  pdf::core::CArray&)':

I did my best (in Google) but found nothing (with searched word "ISO C++ forbids declaration of")
Any ideal :)

tomdkat 04-19-2006 07:57 PM

What version of G++ do you have installed? Run this command:

$ c++ --version

It looks like libpdf++ doesn't use ANSI standard C++. I would contact the maintainer of libpdf++ and have them address these coding errors.

Peace...

caspervn 04-20-2006 04:01 AM

This's mine

Quote:

$ c++ --version
c++ (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And

Quote:

It looks like libpdf++ doesn't use ANSI standard C++.
so how can I tell c++ to compile libpdf with not ANSI standard C++ :(

tomdkat 04-20-2006 10:51 AM

Well, I don't believe you can, nor would you want to. :)

Contact the author and ask for some assistance. Send the compile output you're getting.

Good luck!

Peace...

caspervn 04-21-2006 08:04 AM

tomdkat, thank you :)
May be I should give up compiling this library


All times are GMT -5. The time now is 07:11 AM.