Results 1 to 3 of 3

Thread: problem with : (.bss+0x0):-1: error: multiple definition of `g_usageText'

  1. #1
    Join Date
    Sep 2013
    Posts
    17
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default problem with : (.bss+0x0):-1: error: multiple definition of `g_usageText'

    hey I am new to Qt..
    I am trying to study a program used to render font outlines using freetype2.
    I am getting following error:

    Qt Code:
    1. (.bss+0x0):-1: error: multiple definition of `g_usageText'
    2. (.bss+0x0):-1: error: first defined here
    3. (.bss+0x0):-1: error: multiple definition of `g_usageText'
    4. (.bss+0x0):-1: error: first defined here
    5. :-1: error: collect2: ld returned 1 exit status
    To copy to clipboard, switch view to plain text mode 


    my .pro file is:

    Qt Code:
    1. QT += core gui
    2.  
    3. TARGET = 2_sept_app1
    4. TEMPLATE = app
    5.  
    6. SOURCES += main.cpp\
    7. widget.cpp
    8. MOC_DIR = ./moc
    9. LIBS += -lz -lfreetype
    10. INCLUDEPATH += $$MOC_DIR \
    11. /usr/include/freetype2 \
    12. /usr/lib
    13. HEADERS += widget.h
    To copy to clipboard, switch view to plain text mode 

    I searched on Google and modified .pro file with that 'MOC_DIR' entries....but still problem persists

    how do I solve this problem?

  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: problem with : (.bss+0x0):-1: error: multiple definition of `g_usageText'

    The problem is rather with the code than with the project file. It seems *something* (whatever g_usageText is) is set twice in your program.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2013
    Posts
    17
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: problem with : (.bss+0x0):-1: error: multiple definition of `g_usageText'

    hey sorry... actually it was my typing mistake...
    declared g_UsageText twice ...

    Thanks for reply.

Similar Threads

  1. QT Application gives Multiple Definition Link Error
    By behlkush in forum Qt Programming
    Replies: 4
    Last Post: 10th March 2015, 04:52
  2. Non-existing multiple definition bug
    By uGin in forum Qt Programming
    Replies: 1
    Last Post: 17th May 2011, 17:53
  3. Replies: 1
    Last Post: 17th May 2011, 17:12
  4. multiple definition error - NokiaQtSDK maemo
    By raedbenz in forum Newbie
    Replies: 2
    Last Post: 21st July 2010, 09:03
  5. Getting multiple definition error from qatomic_x86_64.h
    By markcole in forum General Programming
    Replies: 1
    Last Post: 30th August 2007, 20:39

Tags for this Thread

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.