Quantcast
Channel: Qmake does not include the library path for qt - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Qmake does not include the library path for qt

$
0
0

I just install qt on my slax box, And I tried to write and compile using qmake.

But the problem is qmake does not write it's 'Makefile' to include -Lqt-mt or -Lqt.I have to give it manually otherwise there are unresolved links are there. What I could do for this?Any workaround on this?

enter image description here

And this is the 'Makefile' output by the qmake.

############################################################################## Makefile for building: hello# Generated by qmake (2.01a) (Qt 4.5.3) on: Tue Feb 2 04:04:03 2010# Project:  hello_world.pro# Template: app# Command: /usr/bin/qmake -unix -o Makefile hello_world.pro#################################################################################### Compiler, tools and optionsCC            = gccCXX           = g++DEFINES       = CFLAGS        = -pipe $(DEFINES)CXXFLAGS      = -pipe $(DEFINES)INCPATH       = -I/usr/lib/qt-3.3.8b/mkspecs/linux-g++ -I.LINK          = g++LFLAGS        = LIBS          = $(SUBLIBS)   AR            = ar cqsRANLIB        = QMAKE         = /usr/bin/qmakeTAR           = tar -cfCOMPRESS      = gzip -9fCOPY          = cp -fSED           = sedCOPY_FILE     = $(COPY)COPY_DIR      = $(COPY) -rINSTALL_FILE  = $(COPY_FILE)INSTALL_DIR   = $(COPY_DIR)INSTALL_PROGRAM = $(COPY_FILE)DEL_FILE      = rm -fSYMLINK       = ln -sfDEL_DIR       = rmdirMOVE          = mv -fCHK_DIR_EXISTS= test -dMKDIR         = mkdir -p####### Output directoryOBJECTS_DIR   = ./####### FilesSOURCES       = hello_world.cpp OBJECTS       = hello_world.oDIST          = hello_world.proQMAKE_TARGET  = helloDESTDIR       = TARGET        = hellofirst: all####### Implicit rules.SUFFIXES: .o .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 rulesall: Makefile $(TARGET)$(TARGET):  $(OBJECTS)      $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)Makefile: hello_world.pro  /usr/lib/qt-3.3.8b/mkspecs/linux-g++/qmake.conf     $(QMAKE) -unix -o Makefile hello_world.proqmake:  FORCE    @$(QMAKE) -unix -o Makefile hello_world.prodist:     @$(CHK_DIR_EXISTS) .tmp/hello1.0.0 || $(MKDIR) .tmp/hello1.0.0     $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/hello1.0.0/ && (cd `dirname .tmp/hello1.0.0` && $(TAR) hello1.0.0.tar hello1.0.0 && $(COMPRESS) hello1.0.0.tar) && $(MOVE) `dirname .tmp/hello1.0.0`/hello1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/hello1.0.0clean:compiler_clean     -$(DEL_FILE) $(OBJECTS)    -$(DEL_FILE) *~ core *.core####### Sub-librariesdistclean: clean    -$(DEL_FILE) $(TARGET)     -$(DEL_FILE) Makefilecompiler_clean: ####### Compilehello_world.o: hello_world.cpp     $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hello_world.o hello_world.cpp####### Installinstall:   FORCEuninstall:   FORCEFORCE:

And here is my .pro file that I used.

TEMPLATE=appCONFIG+= qt warn_on releaseHEADERS=SOURCES=hello_world.cppTARGET=hello

I already set the $QTDIR and I think everything is in place. Where I missed? Why I have to give it manually? Why qmake does not work in firstplace?

EDIT:There in makefile

LIBS          = $(SUBLIBS) 

What I did is change it to,

LIBS          = $(SUBLIBS)  -lqt-mt

After I changed everything works fine ! The problem is again , why I have to do such a thing manually?

FOR @Frank OsterfeldI think I'm using correct 'qmake' because ,When I hit, qmake --version , I do get this.

QMake version 2.01aUsing Qt version 4.5.3 in /usr/lib/qt/lib

--Thanks in advance--


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>