freetype-devel
[Top][All Lists]
Advanced

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

Compiling on Solaris 2.5.1


From: Jeff Wolkenhauer
Subject: Compiling on Solaris 2.5.1
Date: Tue, 24 Oct 2000 14:16:58 -0700

Hello!

I've been looking into the FreeType library for the first time and am impressed
with what I have seen so far.

My question is about building FreeType 2.0 beta8 on Solaris using Sun's native
compilers:  (WorkShop Compilers 4.2 30 Oct 1996 C/C++ 4.2).

I run gmake, followed by gmake again as the docs suggest.  However I get the
following error when it hits the ccf module:

      cc -c -g -I./builds/unix -I./include -I./src ./src/cff/cff.c
          -KPIC -DPIC -o obj/cff.o
    "./src/cff/t2load.c", line 575: non-constant initializer: op "SCONV"
    "./src/cff/t2load.c", line 576: non-constant initializer: op "SCONV"
    "./src/cff/t2load.c", line 577: non-constant initializer: op "SCONV"
    "./src/cff/t2load.c", line 578: non-constant initializer: op "SCONV"

cc here is the C compiler.

What this appears to mean is that the C compiler doesn't like the eventual macro
expansion that tries to do initialization of a const array using a non-const
variable (apparently the ((type *)0)->version_major).

If I change to the C++ compiler(CC), it gets past this, but gives me:

    "./src/cff/t2load.c", line 575: 
        Error: Cannot cast from char* to unsigned short.

    "./src/cff/t2load.c", line 576: 
        Error: Cannot cast from char* to unsigned short.

    "./src/cff/t2load.c", line 577: 
        Error: Cannot cast from char* to unsigned short.

    "./src/cff/t2load.c", line 578: 
        Error: Cannot cast from char* to unsigned short.

There it doesn't like the cast "(FT_UShort)(char*)&...."

I'm thinking it might just be a matter of the right compiler switch but none
that I read about in the man pages appear helpful.

-- ASIDE --
As an asside, I would really like to know what ((type *)0)->version_major
accomplishes.  I know I don't understand ANY of the internals at all, but
that looks kinda funky to me.  :o)
-- END ASIDE--

I've been able to create the FreeType 2.0 beta8 library on Windows using
DevStudio/VisualC++, which gave me no warnings or errors.  I also can build the
demos and run them on NT as well as Win95.  Gee, and I'm usually more
comfortable on Unix systems.

Could someone give me a tip for building on Solaris please?  Thank you very
kindly!

Regards,
Jeff Wolkenhauer            address@hidden
                            address@hidden
--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]