From: "Прокопьев Евгений" <john@rmts.donpac.ru> To: community@altlinux.ru Subject: [Comm] Ошибки при сборке QT3-приложений Date: Tue, 25 Mar 2003 13:17:09 +0300 Message-ID: <3E802CA5.4040905@rmts.donpac.ru> (raw) [-- Attachment #1: Type: text/plain, Size: 3496 bytes --] Здравствуйте! После установки ALM2.2 пытаюсь перенести свой код с QT2 на QT3. Для просты берем примитивный пример из учебника по QT Designer - Pizza. К письму приложены pizza.pro и сгенерированный Makefile. При сборке получаем: /usr/lib/qt3//bin/uic pizzatestdialogbase.ui -o pizzatestdialogbase.h g++ -c -pipe -Wall -W -pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt3//mkspecs/default -I. -I/usr/lib/qt3//include -o main.o main.cpp g++ -c -pipe -Wall -W -pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt3//mkspecs/default -I. -I/usr/lib/qt3//include -o pizzatestdialog.o pizzatestdialog.cpp /usr/lib/qt3//bin/uic pizzatestdialogbase.ui -i pizzatestdialogbase.h -o pizzatestdialogbase.cpp g++ -c -pipe -Wall -W -pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt3//mkspecs/default -I. -I/usr/lib/qt3//include -o pizzatestdialogbase.o pizzatestdialogbase.cpp /usr/lib/qt3//bin/moc pizzatestdialog.h -o moc_pizzatestdialog.cpp g++ -c -pipe -Wall -W -pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt3//mkspecs/default -I. -I/usr/lib/qt3//include -o moc_pizzatestdialog.o moc_pizzatestdialog.cpp /usr/lib/qt3//bin/moc pizzatestdialogbase.h -o moc_pizzatestdialogbase.cpp g++ -c -pipe -Wall -W -pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt3//mkspecs/default -I. -I/usr/lib/qt3//include -o moc_pizzatestdialogbase.o moc_pizzatestdialogbase.cpp g++ -o pizza main.o pizzatestdialog.o pizzatestdialogbase.o moc_pizzatestdialog.o moc_pizzatestdialogbase.o -L/usr/lib/qt3//lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm main.o: In function `main': main.o(.text+0x20): undefined reference to `QApplication::QApplication(int &, char **)' main.o(.text+0x41): undefined reference to `QApplication::setMainWidget(QWidget *)' main.o(.text+0x49): undefined reference to `QDialog::exec(void)' main.o(.text+0x74): undefined reference to `QApplication::~QApplication(void)' pizzatestdialog.o: In function `PizzaTestDialog::PizzaTestDialog(QWidget *, char const *, bool, unsigned int)': pizzatestdialog.o(.text+0x3b): undefined reference to `QDate::currentDate(void)' pizzatestdialog.o(.text+0x4d): undefined reference to `QDate::dayOfWeek(void) const' pizzatestdialog.o: In function `PizzaTestDialog::sendOrder(void)': pizzatestdialog.o(.text+0xb8): undefined reference to `QString::QString(char const *)' pizzatestdialog.o(.text+0xc8): undefined reference to `QMessageBox::information(QWidget *, QString const &, QString const &, int, int, int)' ... undefined reference to `QPaintDevice::fontMet(QFont *, int, char const *, int) const' moc_pizzatestdialogbase.o(.gnu.linkonce.d.__vt_19PizzaTestDialogBase.12QPaintDevice+0x2c): undefined reference to `QPaintDevice::fontInf(QFont *, int) const' moc_pizzatestdialogbase.o: In function `PizzaTestDialogBase type_info function': moc_pizzatestdialogbase.o(.gnu.linkonce.t.__tf19PizzaTestDialogBase+0x10): undefined reference to `QDialog type_info function' collect2: ld returned 1 exit status make: *** [pizza] Ошибка 1 -- С уважением, Прокопьев Евгений [-- Attachment #2: pizza.pro --] [-- Type: text/plain, Size: 157 bytes --] TEMPLATE = app CONFIG = qt warn_on release HEADERS = pizzatestdialog.h SOURCES = main.cpp \ pizzatestdialog.cpp INTERFACES = pizzatestdialogbase.ui [-- Attachment #3: Makefile --] [-- Type: text/plain, Size: 3918 bytes --] ############################################################################# # Makefile for building: pizza # Generated by qmake (1.04a) (Qt 3.1.1) on: Mon Mar 24 17:49:57 2003 # Project: pizza.pro # Template: app # Command: $(QMAKE) -o Makefile pizza.pro ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ LEX = flex YACC = yacc CFLAGS = -pipe -Wall -W -pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG CXXFLAGS = -pipe -Wall -W -pipe -Wall -O2 -fexpensive-optimizations -march=i586 -mcpu=i686 -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG LEXFLAGS = YACCFLAGS= -d INCPATH = -I$(QTDIR)/mkspecs/default -I. -I$(QTDIR)/include LINK = g++ LFLAGS = LIBS = $(SUBLIBS) -L$(QTDIR)/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm AR = ar cqs RANLIB = MOC = $(QTDIR)/bin/moc UIC = $(QTDIR)/bin/uic QMAKE = qmake TAR = tar -cf GZIP = gzip -9f COPY = cp -f COPY_FILE= $(COPY) -p COPY_DIR = $(COPY) -pR DEL_FILE = rm -f SYMLINK = ln -sf DEL_DIR = rmdir MOVE = mv -f CHK_DIR_EXISTS= test -d MKDIR = mkdir -p ####### Output directory OBJECTS_DIR = ./ ####### Files HEADERS = pizzatestdialog.h SOURCES = main.cpp \ pizzatestdialog.cpp OBJECTS = main.o \ pizzatestdialog.o \ pizzatestdialogbase.o FORMS = pizzatestdialogbase.ui UICDECLS = pizzatestdialogbase.h UICIMPLS = pizzatestdialogbase.cpp SRCMOC = moc_pizzatestdialog.cpp \ moc_pizzatestdialogbase.cpp OBJMOC = moc_pizzatestdialog.o \ moc_pizzatestdialogbase.o DIST = pizza.pro QMAKE_TARGET = pizza DESTDIR = TARGET = pizza first: all ####### Implicit rules .SUFFIXES: .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< ####### Build rules all: Makefile $(TARGET) $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) mocables: $(SRCMOC) $(MOC): ( cd $(QTDIR)/src/moc ; $(MAKE) ) Makefile: pizza.pro $(QTDIR)/mkspecs/default/qmake.conf $(QMAKE) -o Makefile pizza.pro qmake: @$(QMAKE) -o Makefile pizza.pro dist: @mkdir -p .tmp/pizza && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/pizza/ && ( cd `dirname .tmp/pizza` && $(TAR) pizza.tar pizza && $(GZIP) pizza.tar ) && $(MOVE) `dirname .tmp/pizza`/pizza.tar.gz . && $(DEL_FILE) -r .tmp/pizza mocclean: -$(DEL_FILE) $(OBJMOC) -$(DEL_FILE) $(SRCMOC) uiclean: -$(DEL_FILE) $(UICIMPLS) $(UICDECLS) yaccclean: lexclean: clean: mocclean uiclean -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) $(TARGET) $(TARGET) FORCE: ####### Compile main.o: main.cpp pizzatestdialog.h \ pizzatestdialogbase.h pizzatestdialog.o: pizzatestdialog.cpp pizzatestdialog.h \ pizzatestdialogbase.h pizzatestdialogbase.h: pizzatestdialogbase.ui $(UIC) pizzatestdialogbase.ui -o pizzatestdialogbase.h pizzatestdialogbase.cpp: pizzatestdialogbase.h pizzatestdialogbase.ui $(UIC) pizzatestdialogbase.ui -i pizzatestdialogbase.h -o pizzatestdialogbase.cpp pizzatestdialogbase.o: pizzatestdialogbase.cpp pizzatestdialogbase.h moc_pizzatestdialog.o: moc_pizzatestdialog.cpp pizzatestdialog.h pizzatestdialogbase.h moc_pizzatestdialogbase.o: moc_pizzatestdialogbase.cpp pizzatestdialogbase.h moc_pizzatestdialog.cpp: $(MOC) pizzatestdialog.h $(MOC) pizzatestdialog.h -o moc_pizzatestdialog.cpp moc_pizzatestdialogbase.cpp: $(MOC) pizzatestdialogbase.h $(MOC) pizzatestdialogbase.h -o moc_pizzatestdialogbase.cpp ####### Install install: all uninstall:
next reply other threads:[~2003-03-25 10:17 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-03-25 10:17 Прокопьев Евгений [this message] 2003-03-25 13:22 ` [Comm] " Sergey Vlasov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3E802CA5.4040905@rmts.donpac.ru \ --to=john@rmts.donpac.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git