Configuration script:
#! /Bin/bash
PREFIX =/home/mstar/mips-4.3/mips-linux-gnu/libc
CC = mips-linux-gnu-gcc/
CXX = mips-linux-gnu-g ++/
AR = mips-linux-gnu-ar/
RANLIB = mips-linux-gnu-ranlib/
NM = mips-linux-gnu-nm/
AS = mips-linux-gnu-/
LD = mips-linux-gnu-ld/
STRIP = mips-linux-gnu-strip/
READELF = mips-linux-gnu-readelf/
STRINGS = mips-linux-gnu-strings/
SIZE = mips-linux-gnu-size/
ADDR2LINE = mips-linux-gnu-addr2line/
CFLAGS = "-g-I $ {PREFIX}/user/include-I $ {PREFIX}/uclibc/user/include-I/home/mstar/Obama/SDK/opt/ include "/
LDFLAGS = "-L $ {PREFIX}/user/lib-L $ {PREFIX}/uclibc/user/lib-L/home/mstar/Obama/SDK/opt/lib"/
LIBS = "-L $ {PREFIX}/user/lib-L $ {PREFIX}/uclibc/user/lib-L/home/mstar/Obama/SDK/opt/lib"/
CPPFLAGS = "-g-I $ {PREFIX}/user/include-I $ {PREFIX}/uclibc/user/include-I/home/mstar/Obama/SDK/opt/ include "/
CXXFLAGS = "-g-I $ {PREFIX}/user/include-I $ {PREFIX}/uclibc/user/include-I/home/mstar/Obama/SDK/opt/ include "/
./Configure/
-- Build = i386-linux/
-- Host = mips-linux-gnu/
-- Target = mips-linux-gnu/
-- Prefix =/home/mstar/malin/FLTK/
-- Enable-jpeg/
-- Enable-zlib/
-- Enable-png/
-- Disable-xft/
-- Disable-x11/
-- Libdir =/home/mstar/Obama/SDK/opt/lib/
-- Includedir =/home/mstar/Obama/SDK/opt/include/
-- Enable-debug/
-- Enable-shared/
-- Enable-directfb = yes/
-- With-archflags = "-I/home/mstar/Obama/SDK/opt/include/directfb "/
-- Enable-gl = no
Problem: fltk: filename_list function of 1.src/ filename_list.cxx file problem: error message: filename_list.cxx: In function 'int fltk: filename_list (const char *, di1_64 ***, int (*) (const di1_64 * const *, const di1_64 * const *) ': filename_list.cxx: 69: error: invalid conversion from 'int (*) (const void *, const void *) 'to' int (*) (const digoal 64 **, const digoal 64 **) 'filename _ list. cxx: 69: error: initializing argument 4 of 'int scandir64 (const char *, di1_64 ***, int (*) (const di1_64 *), int (*) (const digoal 64 **, const digoal 64 **) 'Make [1]: *** [filename_list.o] Error 1 solution: Modify filename_list.cxx: 69: int n = scandir (d, list, 0, (int (*) (const dirent **, const dirent **) sort );
2. FD_ZERO, FD_SET, and other functions
Error message:
Cc1plus: warning: include location "/usr/include" is unsafe for cross-compilation
X11/run. cxx: In function 'int fl_wait (float )':
X11/run. cxx: 461: error: impossible constraint in 'asm'
X11/run. cxx: 462: error: impossible constraint in 'asm'
X11/run. cxx: 463: error: impossible constraint in 'asm'
Solution:
Replace the/usr/include/bits/select. h file with include/bits/select. h In the self-compiled SDK package.
3. Modify makeinclude
# Flags for C ++ compiler:
OPTIM =-g-Wall-Wunused-fPIC
# CFLAGS = $ (OPTIM)-I/usr/include
CFLAGS = $ (OPTIM)-I/home/mstar/Obama/SDK/opt/include
# CXXFLAGS = $ (OPTIM)-I/usr/include-Wno-non-virtual-dtor
CXXFLAGS = $ (OPTIM)-I/home/mstar/Obama/SDK/opt/include-Wno-non-virtual-dtor
# Libraries to link: # LDLIBS =-L/usr/lib-lXi-lXinerama-lpthread-lm-lXext-lsupc ++ LDLIBS =-L/home/mstar/Obama/SDK/opt/lib- lpthread-lm-lsupc ++ # GLDLIBS =-L/usr/lib-lXi-lXinerama-lpthread-lm-lXext-lsupc ++ GLDLIBS =-L/home/mstar/Obama /SDK/opt/lib-lpthread-lm-lsupc ++