Results 1 to 6 of 6

Thread: Add Librabries in Makefile on Linux

  1. #1
    Join Date
    Apr 2008
    Posts
    4
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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.


    Qt Code:
    1. ######################################################################
    2. # Automatically generated by qmake (2.01a) Fri Apr 18 16:08:34 2008
    3. ######################################################################
    4.  
    5. TEMPLATE = app
    6. TARGET =
    7. CONFIG += qt debug
    8.  
    9. DEPENDPATH += .
    10. INCLUDEPATH += . $(VTKDIR) \
    11.  
    12.  
    13.  
    14. # Input
    15. HEADERS += MyWindow.h \
    16.  
    17. SOURCES += main.cpp MyWindow.cpp
    18.  
    19. ##vtk-libraries##
    20. #VTK_LIB_ROOT = /amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/VTK/vtkBin/lib
    21.  
    22.  
    23. QMAKE_LIBS += -L$(VTKDIR) -lvtkGraphics \
    24.  
    25. -lvtkImaging \
    26.  
    27. -lvtkCommon \
    28.  
    29. -lvtkRendering \
    30.  
    31. -lvtkVolumeRendering \
    32.  
    33. -lvtkIO \
    34.  
    35. -lvtkFiltering \
    36.  
    37. -lvtkWidgets \
    38.  
    39. -lvtkHybrid \
    40.  
    41. -lvtksys \
    42. -lvtkzlib \
    To copy to clipboard, switch view to plain text mode 




    Hier it's a part of Makefile generated from qmake.
    Qt Code:
    1. #############################################################################
    2. # Makefile for building: VTK_Qt_Project
    3. # Generated by qmake (2.01a) (Qt 4.3.4) on: Mon Apr 21 15:04:36 2008
    4. # Project: VTK_Qt_Project.pro
    5. # Template: app
    6. # Command: /amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/bin/qmake -unix -o Makefile VTK_Qt_Project.pro
    7. #############################################################################
    8.  
    9. ####### Compiler, tools and options
    10.  
    11. CC = gcc
    12. CXX = g++
    13. DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    14. CFLAGS = -m64 -pipe -g -D_REENTRANT -Wall -W $(DEFINES)
    15. CXXFLAGS = -m64 -pipe -g -D_REENTRANT -Wall -W $(DEFINES)
    16. 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.
    17. LINK = g++
    18. LFLAGS = -m64 -Wl,-rpath,/amd/fs6/root/home/p/sks/opt/projects/lima/Noukeu/Qt4/lib
    19. 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
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Add Librabries in Makefile on Linux

    Use LIBS+=-lsomelib -lsomeotherlib

  3. #3
    Join Date
    Apr 2008
    Posts
    4
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add Librabries in Makefile on Linux

    It doesn't work.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Add Librabries in Makefile on Linux

    Can we see your full project file that includes your additions to the LIBS variable?

  5. #5
    Join Date
    Apr 2008
    Posts
    4
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add Librabries in Makefile on Linux

    this is the -pro file
    Qt Code:
    1. ######################################################################
    2. # Automatically generated by qmake (2.01a) Fri Apr 18 16:08:34 2008
    3. ######################################################################
    4.  
    5. TEMPLATE = app
    6. TARGET =
    7. CONFIG += qt debug
    8.  
    9. DEPENDPATH += .
    10. INCLUDEPATH += . $(VTKDIR) \
    11.  
    12.  
    13. # Input
    14. HEADERS += MyWindow.h \
    15.  
    16. SOURCES += main.cpp MyWindow.cpp
    17.  
    18. ####################vtk-libraries###################
    19. LIBS += -L$(VTKDIR) -lvtkGraphics -lvtkImaging -lvtkCommon -lvtkRendering -lvtkVolumeRendering -lvtkIO -lvtkFiltering -lvtkWidgets -lvtkHybrid -lvtksys -lvtkzlib -lvtkImaging \
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.

Similar Threads

  1. not able to change Makefile
    By shamik in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2007, 12:00
  2. Replies: 5
    Last Post: 13th March 2006, 20:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.