Add Librabries in Makefile on Linux
i try to add some libraries in the Makefile. qmake adds them but not at the end of the LIBS-Variables from Makefile.
Code:
######################################################################
# Automatically generated by qmake (2.01a) Fri Apr 18 16:08:34 2008
######################################################################
TEMPLATE = app
TARGET =
CONFIG += qt debug
DEPENDPATH += .
INCLUDEPATH += . $(VTKDIR) \
# Input
HEADERS += MyWindow.h \
SOURCES += main.cpp MyWindow.cpp
##vtk-libraries##
#VTK_LIB_ROOT = /amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/VTK/vtkBin/lib
QMAKE_LIBS += -L$(VTKDIR) -lvtkGraphics \
-lvtkImaging \
-lvtkCommon \
-lvtkRendering \
-lvtkVolumeRendering \
-lvtkIO \
-lvtkFiltering \
-lvtkWidgets \
-lvtkHybrid \
-lvtksys \
-lvtkzlib \
Hier it's a part of Makefile generated from qmake.
Code:
#############################################################################
# Makefile for building: VTK_Qt_Project
# Generated by qmake (2.01a) (Qt 4.3.4) on: Mon Apr 21 15:04:36 2008
# Project: VTK_Qt_Project.pro
# Template: app
# Command: /amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/bin/qmake -unix -o Makefile VTK_Qt_Project.pro
#############################################################################
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -m64 -pipe -g -D_REENTRANT -Wall -W $(DEFINES)
CXXFLAGS = -m64 -pipe -g -D_REENTRANT -Wall -W $(DEFINES)
INCPATH = -I/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/mkspecs/default -I. -I/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/include/QtCore -I/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/include/QtCore -I/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/include/QtGui -I/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/include/QtGui -I/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/include -I. -I$(VTKDIR) -I. -I.
LINK = g++
LFLAGS = -m64 -Wl,-rpath,/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/lib
LIBS = $(SUBLIBS) -L/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4//lib -L$(VTKDIR) -lvtkGraphics -lvtkImaging -lvtkCommon -lvtkRendering -lvtkVolumeRendering -lvtkIO -lvtkFiltering -lvtkWidgets -lvtkHybrid -lvtksys -lvtkzlib -lQtGui -L/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4//lib -L/usr/X11R6/lib64 -lpng -lSM -lICE -pthread -L/opt/gnome/lib64 -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -ldl -lpthread
Re: Add Librabries in Makefile on Linux
Use LIBS+=-lsomelib -lsomeotherlib
Re: Add Librabries in Makefile on Linux
Re: Add Librabries in Makefile on Linux
Can we see your full project file that includes your additions to the LIBS variable?
Re: Add Librabries in Makefile on Linux
this is the -pro file
Code:
######################################################################
# Automatically generated by qmake (2.01a) Fri Apr 18 16:08:34 2008
######################################################################
TEMPLATE = app
TARGET =
CONFIG += qt debug
DEPENDPATH += .
INCLUDEPATH += . $(VTKDIR) \
# Input
HEADERS += MyWindow.h \
SOURCES += main.cpp MyWindow.cpp
####################vtk-libraries###################
LIBS += -L$(VTKDIR) -lvtkGraphics -lvtkImaging -lvtkCommon -lvtkRendering -lvtkVolumeRendering -lvtkIO -lvtkFiltering -lvtkWidgets -lvtkHybrid -lvtksys -lvtkzlib -lvtkImaging \
Re: Add Librabries in Makefile on Linux
Hmm.... and qmake doesn't complain about it? What are those trailing backslashes doing there? Apart from them the file is fine. Try deleting the makefile and see if it gets regenerated after you call qmake.