This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Problem compiling freetype
- To: gcc-help at gcc dot gnu dot org
- Subject: Problem compiling freetype
- From: Murali Potla <murali_linux at yahoo dot com>
- Date: Tue, 31 Jul 2001 19:07:01 +0530
- Reply-To: murali_linux at yahoo dot com
Hai I am trying to compile freetype 2 on gcc 3
i gam getting the following error when compiling
make: Entering directory `/usr/src/rpm/BUILD/freetype-2.0.3/ttmkfdir2'
rm -f *.o *~ ttmkfdir core parser.cpp
make: Leaving directory `/usr/src/rpm/BUILD/freetype-2.0.3/ttmkfdir2'
+ make -C ttmkfdir2
make: Entering directory `/usr/src/rpm/BUILD/freetype-2.0.3/ttmkfdir2'
libtool --mode=compile g++ -Wall -pedantic -I../freetype-pre1.4/lib/. -ggdb
-o ttmkfdir.o -c ttmkfdir.cpp
mkdir .libs
g++ -Wall -pedantic -I../freetype-pre1.4/lib/. -ggdb -c ttmkfdir.cpp -fPIC
-DPIC -o .libs/ttmkfdir.lo
In file included from ttmkfdir.h:6,
from ttmkfdir.cpp:6:
commandline.h:11: warning: ISO C++ forbids declaration of `ostream' with no
type
commandline.h:11: `ostream' is neither function nor member function; cannot be
declared friend
commandline.h:11: parse error before `&' token
commandline.h:12: warning: ISO C++ forbids declaration of `ostream' with no
type
commandline.h:12: `ostream' is neither function nor member function; cannot be
declared friend
commandline.h:12: declaration of `int Commandline::ostream'
commandline.h:11: conflicts with previous declaration `int
Commandline::ostream'
commandline.h:12: parse error before `&' token
commandline.h:12: duplicate member `Commandline::ostream'
In file included from ttmkfdir.cpp:7:
ttf.h:34: parse error before `&' token
make: *** [ttmkfdir.o] Error 1
make: Leaving directory `/usr/src/rpm/BUILD/freetype-2.0.3/ttmkfdir2'
error: Bad exit status from /var/tmp/rpm-tmp.66181 (%build)
What is going wrong here
Thanks for any help
I am sending Commandline.cxx file as attachment
/* -*- C++ -*- */
#ifndef COMMANDLINE_H__
#define COMMANDLINE_H__
#include <string>
#include <map>
#include <iostream>
#include "util.h"
class Commandline {
friend ostream &operator<< (ostream &, const Commandline &);
friend ostream &operator<< (ostream &, const Commandline *);
public:
class Option {
friend class Commandline;
public:
class InvalidArg {
public:
InvalidArg (const char *arg) : option (arg) {};
~InvalidArg (void) {};
std::string option;
};
Option (const char *n, char sop, const char *defval = 0);
~Option (void);
operator bool ();
operator int ();
operator double ();
operator std::string ();
protected:
std::string name;
char shortop;
bool argument;
std::string value;
};
virtual ~Commandline (void);
Option &option (const std::string &n);
void AddOption (Option *);
void parse (int argc, char *argv[]);
protected:
std::map<std::string, Option *> OptionsByName;
std::map<int, Option *> OptionsBySop;
void dump (std::ostream &dst) const;
};
#endif /* COMMANDLINE_H__ */