도와주세요!!
글 수 15,339
2003.12.09 16:52:16 (*.49.227.216)
6730
os는 wowlinux7.3 이고 요.
cross컴파일러는 자료실에 있는 것을 풀어서 환경을 구축 했습니다( 4개 파일 다)
그리고 libstdc++ 도 /usr/armv5l-linux/ 에서 풀었습니다..
qt-embedded-2.3.7.tar.gz 도 /project/gt/src 에 풀어 놓고요.
configs 에서 4개의 파일을 다 만들어서
밑의 내용을 로 수정을 했습니다.
src 밑에 있는 makefile도 문서에 나와 있는데로 수정을 했습니다
그런데 configure 를 하고 만들어진 makefile 에 make를 하니까/??
마지막으로
/project/qt/src/qt-2.3.7/bin/moc: /project/qt/src/qt-2.3.7/bin/moc: cannot
excecute binary file
make[2]: *** [kernel/gthread_unix.moc] 오류 126
....
make[1]: ** [sub-src] 오류 2
....
make: *** [init] 오류 2
등의 메시지가 나고 컴파일이 돼지 않습니다.
수정한 네용.
/project/src/qt-2.3.7/configs/linux-armv5l-g++-shared 파일입니다
# Compiling
INTERFACE_DECL_PATH = .
SYSCONF_CXX = armv5l-linux-g++
SYSCONF_CC = armv5l-linux-gcc
DASHCROSS = -armv5l
# Compiling with support libraries
SYSCONF_CXXFLAGS_X11 =
SYSCONF_CXXFLAGS_QT = -I$(QTDIR)/include -I/usr/armv5l-linux/include
SYSCONF_CXXFLAGS_QTOPIA = -I$(QPEDIR)/include
SYSCONF_CXXFLAGS_OPENGL = -I/usr/X11R6/include
# Compiling YACC output
SYSCONF_CXXFLAGS_YACC = -Wno-unused -Wno-parentheses
# Linking with support libraries
SYSCONF_RPATH_X11 =
SYSCONF_RPATH_QT = -Wl,-rpath,$(QTDIR)/lib
SYSCONF_RPATH_QTOPIA = -Wl,-rpath,$(QPEDIR)/lib
SYSCONF_RPATH_OPENGL = -Wl,-rpath,/usr/X11R6/lib
# Linking with support libraries
# X11
SYSCONF_LFLAGS_X11 =
SYSCONF_LIBS_X11 =
# Qt, Qt+OpenGL
SYSCONF_LFLAGS_QT = -L$(QTDIR)/lib
SYSCONF_LFLAGS_QTOPIA = -L$(QPEDIR)/lib
SYSCONF_LIBS_QT = -lqte$(QT_THREAD_SUFFIX)
SYSCONF_LIBS_QT_OPENGL =
SYSCONF_LIBS_QTOPIA = -lqtopia
# OpenGL
SYSCONF_LFLAGS_OPENGL = -L/usr/X11R6/lib
SYSCONF_LIBS_OPENGL =
# Yacc
SYSCONF_LIBS_YACC =
# Linking applications
SYSCONF_LINK = arm-linux-gcc
SYSCONF_LFLAGS =
SYSCONF_LIBS = -lm
# Link flags for shared objects
SYSCONF_LFLAGS_SHOBJ = -shared
# Flags for threading
SYSCONF_CFLAGS_THREAD = -D_REENTRANT
SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT
SYSCONF_LFLAGS_THREAD =
SYSCONF_LIBS_THREAD = -lpthread
# Meta-object compiler
SYSCONF_MOC = $(QTDIR)/bin/moc
# UI compiler
SYSCONF_UIC = $(QTDIR)/bin/uic
# Linking shared libraries
# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
# - Place target in $(DESTDIR) - which has a trailing /
# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
#
SYSCONF_LINK_SHLIB = armv5l-linux-gcc
SYSCONF_LINK_TARGET_SHARED =
lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared
-Wl,-soname,lib$(TARGET).so.$(VER_MAJ)
$(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED)
$(OBJECTS) $(OBJMOC) -L/usr/armv5l-linux/lib
$(LIBS) &&
mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR);
cd $(DESTDIR) &&
rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ)
lib$(TARGET).so.$(VER_MAJ).$(VER_MIN);
ln -s $(SYSCONF_LINK_TARGET_SHARED)
lib$(TARGET).so;
ln -s $(SYSCONF_LINK_TARGET_SHARED)
lib$(TARGET).so.$(VER_MAJ);
ln -s $(SYSCONF_LINK_TARGET_SHARED)
lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
# Linking static libraries
# - Build the $(TARGET) library, eg. lib$(TARGET).a
# - Place target in $(DESTDIR) - which has a trailing /
#
SYSCONF_AR = armv5l-linux-ar cqs
SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ;
$(SYSCONF_AR)
$(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
# Compiling application source
SYSCONF_CXXFLAGS = -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W
-DNO_DEBUG
SYSCONF_CFLAGS = -pipe -O2 -Wall -W
# Default link type (static linking is still be used where required)
SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED)
SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED)
# Compiling library source
SYSCONF_CXXFLAGS_LIB = -fPIC
SYSCONF_CFLAGS_LIB = -fPIC
# Compiling shared-object source
SYSCONF_CXXFLAGS_SHOBJ = -fPIC
SYSCONF_CFLAGS_SHOBJ = -fPIC
# Linking Qt
SYSCONF_LIBS_QTLIB = $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
# Linking Qt applications
SYSCONF_LIBS_QTAPP =
고수님을 지도 편달 부탁드립니다.
급한 문제 입니다...
cross컴파일러는 자료실에 있는 것을 풀어서 환경을 구축 했습니다( 4개 파일 다)
그리고 libstdc++ 도 /usr/armv5l-linux/ 에서 풀었습니다..
qt-embedded-2.3.7.tar.gz 도 /project/gt/src 에 풀어 놓고요.
configs 에서 4개의 파일을 다 만들어서
밑의 내용을 로 수정을 했습니다.
src 밑에 있는 makefile도 문서에 나와 있는데로 수정을 했습니다
그런데 configure 를 하고 만들어진 makefile 에 make를 하니까/??
마지막으로
/project/qt/src/qt-2.3.7/bin/moc: /project/qt/src/qt-2.3.7/bin/moc: cannot
excecute binary file
make[2]: *** [kernel/gthread_unix.moc] 오류 126
....
make[1]: ** [sub-src] 오류 2
....
make: *** [init] 오류 2
등의 메시지가 나고 컴파일이 돼지 않습니다.
수정한 네용.
/project/src/qt-2.3.7/configs/linux-armv5l-g++-shared 파일입니다
# Compiling
INTERFACE_DECL_PATH = .
SYSCONF_CXX = armv5l-linux-g++
SYSCONF_CC = armv5l-linux-gcc
DASHCROSS = -armv5l
# Compiling with support libraries
SYSCONF_CXXFLAGS_X11 =
SYSCONF_CXXFLAGS_QT = -I$(QTDIR)/include -I/usr/armv5l-linux/include
SYSCONF_CXXFLAGS_QTOPIA = -I$(QPEDIR)/include
SYSCONF_CXXFLAGS_OPENGL = -I/usr/X11R6/include
# Compiling YACC output
SYSCONF_CXXFLAGS_YACC = -Wno-unused -Wno-parentheses
# Linking with support libraries
SYSCONF_RPATH_X11 =
SYSCONF_RPATH_QT = -Wl,-rpath,$(QTDIR)/lib
SYSCONF_RPATH_QTOPIA = -Wl,-rpath,$(QPEDIR)/lib
SYSCONF_RPATH_OPENGL = -Wl,-rpath,/usr/X11R6/lib
# Linking with support libraries
# X11
SYSCONF_LFLAGS_X11 =
SYSCONF_LIBS_X11 =
# Qt, Qt+OpenGL
SYSCONF_LFLAGS_QT = -L$(QTDIR)/lib
SYSCONF_LFLAGS_QTOPIA = -L$(QPEDIR)/lib
SYSCONF_LIBS_QT = -lqte$(QT_THREAD_SUFFIX)
SYSCONF_LIBS_QT_OPENGL =
SYSCONF_LIBS_QTOPIA = -lqtopia
# OpenGL
SYSCONF_LFLAGS_OPENGL = -L/usr/X11R6/lib
SYSCONF_LIBS_OPENGL =
# Yacc
SYSCONF_LIBS_YACC =
# Linking applications
SYSCONF_LINK = arm-linux-gcc
SYSCONF_LFLAGS =
SYSCONF_LIBS = -lm
# Link flags for shared objects
SYSCONF_LFLAGS_SHOBJ = -shared
# Flags for threading
SYSCONF_CFLAGS_THREAD = -D_REENTRANT
SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT
SYSCONF_LFLAGS_THREAD =
SYSCONF_LIBS_THREAD = -lpthread
# Meta-object compiler
SYSCONF_MOC = $(QTDIR)/bin/moc
# UI compiler
SYSCONF_UIC = $(QTDIR)/bin/uic
# Linking shared libraries
# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
# - Place target in $(DESTDIR) - which has a trailing /
# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
#
SYSCONF_LINK_SHLIB = armv5l-linux-gcc
SYSCONF_LINK_TARGET_SHARED =
lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared
-Wl,-soname,lib$(TARGET).so.$(VER_MAJ)
$(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED)
$(OBJECTS) $(OBJMOC) -L/usr/armv5l-linux/lib
$(LIBS) &&
mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR);
cd $(DESTDIR) &&
rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ)
lib$(TARGET).so.$(VER_MAJ).$(VER_MIN);
ln -s $(SYSCONF_LINK_TARGET_SHARED)
lib$(TARGET).so;
ln -s $(SYSCONF_LINK_TARGET_SHARED)
lib$(TARGET).so.$(VER_MAJ);
ln -s $(SYSCONF_LINK_TARGET_SHARED)
lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
# Linking static libraries
# - Build the $(TARGET) library, eg. lib$(TARGET).a
# - Place target in $(DESTDIR) - which has a trailing /
#
SYSCONF_AR = armv5l-linux-ar cqs
SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ;
$(SYSCONF_AR)
$(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
# Compiling application source
SYSCONF_CXXFLAGS = -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W
-DNO_DEBUG
SYSCONF_CFLAGS = -pipe -O2 -Wall -W
# Default link type (static linking is still be used where required)
SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED)
SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED)
# Compiling library source
SYSCONF_CXXFLAGS_LIB = -fPIC
SYSCONF_CFLAGS_LIB = -fPIC
# Compiling shared-object source
SYSCONF_CXXFLAGS_SHOBJ = -fPIC
SYSCONF_CFLAGS_SHOBJ = -fPIC
# Linking Qt
SYSCONF_LIBS_QTLIB = $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
# Linking Qt applications
SYSCONF_LIBS_QTAPP =
고수님을 지도 편달 부탁드립니다.
급한 문제 입니다...