PDA

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



sarbh20ss
3rd September 2013, 14:46
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:



(.bss+0x0):-1: error: multiple definition of `g_usageText'
(.bss+0x0):-1: error: first defined here
(.bss+0x0):-1: error: multiple definition of `g_usageText'
(.bss+0x0):-1: error: first defined here
:-1: error: collect2: ld returned 1 exit status



my .pro file is:



QT += core gui

TARGET = 2_sept_app1
TEMPLATE = app

SOURCES += main.cpp\
widget.cpp
MOC_DIR = ./moc
LIBS += -lz -lfreetype
INCLUDEPATH += $$MOC_DIR \
/usr/include/freetype2 \
/usr/lib
HEADERS += widget.h


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

how do I solve this problem?

wysota
3rd September 2013, 23:04
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.

sarbh20ss
5th September 2013, 12:47
hey sorry... actually it was my typing mistake...
declared g_UsageText twice ...

Thanks for reply.