[Scribus] I try to compile .14

Paul paul
Thu Jan 29 22:40:21 CET 2004


Hi,

> checking how to run the C++ preprocessor... /lib/cpp
> configure: error: C++ preprocessor "/lib/cpp" fails sanity check
> See `config.log' for more details.
> "
> 
> Maybe I dont have something installed

libstdc++-devel covers that bit - however, start up a text editor and
try this

#include <iostream>

using namespace std;

template <class T>
class Pair
{
public:
  Pair (T x1, T y1) : x(x1), y(y1) {}
  void showQ();
private:
  T x, y;
};

template <class T>
void Pair<T>::showQ()
{
  cout << x / y << endl;
}

int main()
{
  Pair<double> a(37.0, 5.0);
  Pair<int> u(37, 5);
  a.showQ();
  u.showQ();
}

Save (test.cpp) and compile using the following

g++ -O2 test.cpp -o test

It should just compile and when you run it (./test) you get the result
7.4 and 7.

If that fails, you have a problem with the install, but try this first
to see if things are working as they should be. If not, come back and
we'll sort you out :-)

TTFN

Paul

-- 
"You can't beat the system, but you sure as hell can break it"
Malcolm in the Middle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20040129/a8146b6d/attachment.pgp 



More information about the scribus mailing list