:-1: error: symbol(s) not found for architecture x86_64
-
@Dhara The question is actually: should it be an executable or a lib? So, do you want to execute QTConsoleApp? Because you cannot execute a library.
It doesn't have to be a lib to be able to access its source file from Test project. You can just add needed source files in the pro file of your Test project.@jsulm : i actually want to run the test project and see if the test cases pass or fail. I however changed it to app too :D.. but i get the same error . I am unfortunately knew to C++ and qT too so i wasn't even aware what i should pick so i think either one should be ok : exe types or even lib.
-
@jsulm : i actually want to run the test project and see if the test cases pass or fail. I however changed it to app too :D.. but i get the same error . I am unfortunately knew to C++ and qT too so i wasn't even aware what i should pick so i think either one should be ok : exe types or even lib.
-
@jsulm : I updated the code and i get the same kind of error but i think its reduced a little bit:
Undefined symbols for architecture x86_64: "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [11]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [11], char const*, char const*, char const*, int)", referenced from: TestGroup::copyOfGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName2() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [1]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [1], char const*, char const*, char const*, int)", referenced from: TestUser::nullUserUriIsEmpty() in test_user.o TestUser::nullUserNameIsEmpty() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestGroup::nullGroupUriIsEmpty() in test_group.o TestGroup::nullGroupNameIsEmpty() in test_group.o TestGroup::initialNameForNamelessGroupIsEmpty() in test_group.o ...
i have not pasted the other errors, but are of similar kinds.
-
@jsulm : I updated the code and i get the same kind of error but i think its reduced a little bit:
Undefined symbols for architecture x86_64: "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [11]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [11], char const*, char const*, char const*, int)", referenced from: TestGroup::copyOfGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName2() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [1]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [1], char const*, char const*, char const*, int)", referenced from: TestUser::nullUserUriIsEmpty() in test_user.o TestUser::nullUserNameIsEmpty() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestGroup::nullGroupUriIsEmpty() in test_group.o TestGroup::nullGroupNameIsEmpty() in test_group.o TestGroup::initialNameForNamelessGroupIsEmpty() in test_group.o ...
i have not pasted the other errors, but are of similar kinds.
-
@Dhara What exactly did you update? It looks like QTest::qCompare is not found. Do you have QT += testlib in the pro file in your Test project?
@jsulm I moved the files from qTConsoleApp to the Test project. So now i just have 2 pro files. The main one and the Test Project one's.
main pro:
TEMPLATE = subdirs SUBDIRS += \ Test
Test project's pro:
#------------------------------------------------- # # Project created by QtCreator 2017-06-18T23:06:36 # #------------------------------------------------- QT += testlib QT -= gui TARGET = test_user CONFIG += console CONFIG -= app_bundle TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ test_user.cc \ test_group.cc \ contact.cpp \ user.cpp \ group.cpp DEFINES += SRCDIR=\\\"$$PWD/\\\" INCLUDEPATH += ../QTConsoleApp stdlib -=libc++ stdlib -=libstdc++ HEADERS += \ contact.h \ user.h \ group.h
Yes,, it does have the line you wrote.
-
@Dhara What exactly did you update? It looks like QTest::qCompare is not found. Do you have QT += testlib in the pro file in your Test project?
@jsulm : also, here is the whole error message
Undefined symbols for architecture x86_64: "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [11]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [11], char const*, char const*, char const*, int)", referenced from: TestGroup::copyOfGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName2() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [1]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [1], char const*, char const*, char const*, int)", referenced from: TestUser::nullUserUriIsEmpty() in test_user.o TestUser::nullUserNameIsEmpty() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestGroup::nullGroupUriIsEmpty() in test_group.o TestGroup::nullGroupNameIsEmpty() in test_group.o TestGroup::initialNameForNamelessGroupIsEmpty() in test_group.o ... "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [20]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [20], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForNamedUser() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [22]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [22], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForeNamelessUser() in test_user.o TestUser::copyOfUserHasSameUri() in test_user.o TestUser::contactFromUserHasSameUri() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [23]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [23], char const*, char const*, char const*, int)", referenced from: TestGroup::canInitUriWithCtorForeNamelessGroup() in test_group.o TestGroup::canInitUriWithCtorForNamedGroup() in test_group.o TestGroup::copyOfGroupHasSameUri() in test_group.o TestGroup::contactFromGroupHasSameUri() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [4]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [4], char const*, char const*, char const*, int)", referenced from: TestUser::canInitNameWithCtor() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o TestUser::contactFromUserHasSameName() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [6]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [6], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasUnset() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [7]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [7], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o TestGroup::canInitNameWithCtor() in test_group.o TestGroup::canChangeGroupNameIfWasUnset() in test_group.o ... "contact::name()", referenced from: TestUser::nullUserNameIsEmpty() in test_user.o TestUser::canInitNameWithCtor() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o ... "contact::setUri(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o "contact::setName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o ...
-
@jsulm I moved the files from qTConsoleApp to the Test project. So now i just have 2 pro files. The main one and the Test Project one's.
main pro:
TEMPLATE = subdirs SUBDIRS += \ Test
Test project's pro:
#------------------------------------------------- # # Project created by QtCreator 2017-06-18T23:06:36 # #------------------------------------------------- QT += testlib QT -= gui TARGET = test_user CONFIG += console CONFIG -= app_bundle TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ test_user.cc \ test_group.cc \ contact.cpp \ user.cpp \ group.cpp DEFINES += SRCDIR=\\\"$$PWD/\\\" INCLUDEPATH += ../QTConsoleApp stdlib -=libc++ stdlib -=libstdc++ HEADERS += \ contact.h \ user.h \ group.h
Yes,, it does have the line you wrote.
@Dhara said in :-1: error: symbol(s) not found for architecture x86_64:
I moved the files from qTConsoleApp to the Test project
Why?! They belong to qTConsoleApp, not to the test project! Don't move them, just reference them in Test pro file:
SOURCES += \ test_user.cc \ test_group.cc \ ..\QTConsoleApp\contact.cpp \ ..\QTConsoleApp\user.cpp \ ..\QTConsoleApp\group.cpp
-
@Dhara said in :-1: error: symbol(s) not found for architecture x86_64:
I moved the files from qTConsoleApp to the Test project
Why?! They belong to qTConsoleApp, not to the test project! Don't move them, just reference them in Test pro file:
SOURCES += \ test_user.cc \ test_group.cc \ ..\QTConsoleApp\contact.cpp \ ..\QTConsoleApp\user.cpp \ ..\QTConsoleApp\group.cpp
-
@Dhara said in :-1: error: symbol(s) not found for architecture x86_64:
I moved the files from qTConsoleApp to the Test project
Why?! They belong to qTConsoleApp, not to the test project! Don't move them, just reference them in Test pro file:
SOURCES += \ test_user.cc \ test_group.cc \ ..\QTConsoleApp\contact.cpp \ ..\QTConsoleApp\user.cpp \ ..\QTConsoleApp\group.cpp
@jsulm , i have got the files back and added the sources too, the error message i get is :
Undefined symbols for architecture x86_64: "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [11]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [11], char const*, char const*, char const*, int)", referenced from: TestGroup::copyOfGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName2() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [1]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [1], char const*, char const*, char const*, int)", referenced from: TestUser::nullUserUriIsEmpty() in test_user.o TestUser::nullUserNameIsEmpty() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestGroup::nullGroupUriIsEmpty() in test_group.o TestGroup::nullGroupNameIsEmpty() in test_group.o TestGroup::initialNameForNamelessGroupIsEmpty() in test_group.o ... "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [20]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [20], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForNamedUser() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [22]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [22], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForeNamelessUser() in test_user.o TestUser::copyOfUserHasSameUri() in test_user.o TestUser::contactFromUserHasSameUri() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [23]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [23], char const*, char const*, char const*, int)", referenced from: TestGroup::canInitUriWithCtorForeNamelessGroup() in test_group.o TestGroup::canInitUriWithCtorForNamedGroup() in test_group.o TestGroup::copyOfGroupHasSameUri() in test_group.o TestGroup::contactFromGroupHasSameUri() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [4]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [4], char const*, char const*, char const*, int)", referenced from: TestUser::canInitNameWithCtor() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o TestUser::contactFromUserHasSameName() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [6]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [6], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasUnset() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [7]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [7], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o TestGroup::canInitNameWithCtor() in test_group.o TestGroup::canChangeGroupNameIfWasUnset() in test_group.o ... "contact::name()", referenced from: TestUser::nullUserNameIsEmpty() in test_user.o TestUser::canInitNameWithCtor() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o ... "contact::setUri(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o "contact::setName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o ...
-
@jsulm , i have got the files back and added the sources too, the error message i get is :
Undefined symbols for architecture x86_64: "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [11]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [11], char const*, char const*, char const*, int)", referenced from: TestGroup::copyOfGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName2() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [1]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [1], char const*, char const*, char const*, int)", referenced from: TestUser::nullUserUriIsEmpty() in test_user.o TestUser::nullUserNameIsEmpty() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestGroup::nullGroupUriIsEmpty() in test_group.o TestGroup::nullGroupNameIsEmpty() in test_group.o TestGroup::initialNameForNamelessGroupIsEmpty() in test_group.o ... "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [20]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [20], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForNamedUser() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [22]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [22], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForeNamelessUser() in test_user.o TestUser::copyOfUserHasSameUri() in test_user.o TestUser::contactFromUserHasSameUri() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [23]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [23], char const*, char const*, char const*, int)", referenced from: TestGroup::canInitUriWithCtorForeNamelessGroup() in test_group.o TestGroup::canInitUriWithCtorForNamedGroup() in test_group.o TestGroup::copyOfGroupHasSameUri() in test_group.o TestGroup::contactFromGroupHasSameUri() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [4]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [4], char const*, char const*, char const*, int)", referenced from: TestUser::canInitNameWithCtor() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o TestUser::contactFromUserHasSameName() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [6]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [6], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasUnset() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [7]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [7], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o TestGroup::canInitNameWithCtor() in test_group.o TestGroup::canChangeGroupNameIfWasUnset() in test_group.o ... "contact::name()", referenced from: TestUser::nullUserNameIsEmpty() in test_user.o TestUser::canInitNameWithCtor() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o ... "contact::setUri(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o "contact::setName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o ...
-
@jsulm :
void nullUserUriIsEmpty() { user u; QCOMPARE(u.uri(), ""); }
The method u.uri() is as under:
string contact::uri() { return *contactUri; } // inside the cpp file string uri(); // inside the h file
-
@jsulm sure: here it is:
16:15:24: Running steps for project QTSubDirs... 16:15:24: Configuration unchanged, skipping qmake step. 16:15:24: Starting: "/usr/bin/make" cd QTConsoleApp/ && ( test -e Makefile || /Users/user1/Qt5.9.0/5.9/clang_64/bin/qmake -o Makefile /Users/user1/Documents/QTSubDirs/QTConsoleApp/QTConsoleApp.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQTCONSOLEAPP_LIBRARY -DQT_QML_DEBUG -DQT_CORE_LIB -I../../QTSubDirs/QTConsoleApp -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o main.o ../../QTSubDirs/QTConsoleApp/main.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQTCONSOLEAPP_LIBRARY -DQT_QML_DEBUG -DQT_CORE_LIB -I../../QTSubDirs/QTConsoleApp -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o contact.o ../../QTSubDirs/QTConsoleApp/contact.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQTCONSOLEAPP_LIBRARY -DQT_QML_DEBUG -DQT_CORE_LIB -I../../QTSubDirs/QTConsoleApp -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o user.o ../../QTSubDirs/QTConsoleApp/user.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQTCONSOLEAPP_LIBRARY -DQT_QML_DEBUG -DQT_CORE_LIB -I../../QTSubDirs/QTConsoleApp -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o group.o ../../QTSubDirs/QTConsoleApp/group.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,/Users/user1/Qt5.9.0/5.9/clang_64/lib -o QTConsoleApp main.o contact.o user.o group.o -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -framework QtCore -framework DiskArbitration -framework IOKit cd Test/ && ( test -e Makefile || /Users/user1/Qt5.9.0/5.9/clang_64/bin/qmake -o Makefile /Users/user1/Documents/QTSubDirs/Test/Test.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -dM -E -o moc_predefs.h ../../../Qt5.9.0/5.9/clang_64/mkspecs/features/data/dummy.cpp /Users/user1/Qt5.9.0/5.9/clang_64/bin/moc -DQT_DEPRECATED_WARNINGS -DSRCDIR=\"/Users/user1/Documents/QTSubDirs/Test/\" -DQT_QML_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/Users/user1/Documents/build-QTSubDirs-Desktop_Qt_5_9_0_clang_64bit-Debug/Test"' --include ./moc_predefs.h -I/Users/user1/Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -I/Users/user1/Documents/QTSubDirs/Test -I/Users/user1/Qt5.9.0/5.9/clang_64/lib/QtTest.framework/Headers -I/Users/user1/Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.1.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include -F/Users/user1/Qt5.9.0/5.9/clang_64/lib ../../QTSubDirs/Test/test_user.cc -o test_user.moc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DSRCDIR=\"/Users/user1/Documents/QTSubDirs/Test/\" -DQT_QML_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/Users/user1/Documents/build-QTSubDirs-Desktop_Qt_5_9_0_clang_64bit-Debug/Test"' -I../../QTSubDirs/Test -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtTest.framework/Headers -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o test_user.o ../../QTSubDirs/Test/test_user.cc /Users/user1/Qt5.9.0/5.9/clang_64/bin/moc -DQT_DEPRECATED_WARNINGS -DSRCDIR=\"/Users/user1/Documents/QTSubDirs/Test/\" -DQT_QML_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/Users/user1/Documents/build-QTSubDirs-Desktop_Qt_5_9_0_clang_64bit-Debug/Test"' --include ./moc_predefs.h -I/Users/user1/Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -I/Users/user1/Documents/QTSubDirs/Test -I/Users/user1/Qt5.9.0/5.9/clang_64/lib/QtTest.framework/Headers -I/Users/user1/Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.1.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include -F/Users/user1/Qt5.9.0/5.9/clang_64/lib ../../QTSubDirs/Test/test_group.cc -o test_group.moc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DSRCDIR=\"/Users/user1/Documents/QTSubDirs/Test/\" -DQT_QML_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/Users/user1/Documents/build-QTSubDirs-Desktop_Qt_5_9_0_clang_64bit-Debug/Test"' -I../../QTSubDirs/Test -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtTest.framework/Headers -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o test_group.o ../../QTSubDirs/Test/test_group.cc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DSRCDIR=\"/Users/user1/Documents/QTSubDirs/Test/\" -DQT_QML_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/Users/user1/Documents/build-QTSubDirs-Desktop_Qt_5_9_0_clang_64bit-Debug/Test"' -I../../QTSubDirs/Test -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtTest.framework/Headers -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o contact.o ../../QTSubDirs/QTConsoleApp/contact.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DSRCDIR=\"/Users/user1/Documents/QTSubDirs/Test/\" -DQT_QML_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/Users/user1/Documents/build-QTSubDirs-Desktop_Qt_5_9_0_clang_64bit-Debug/Test"' -I../../QTSubDirs/Test -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtTest.framework/Headers -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o user.o ../../QTSubDirs/QTConsoleApp/user.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DSRCDIR=\"/Users/user1/Documents/QTSubDirs/Test/\" -DQT_QML_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/Users/user1/Documents/build-QTSubDirs-Desktop_Qt_5_9_0_clang_64bit-Debug/Test"' -I../../QTSubDirs/Test -I. -I../../../Qt5.9.0/5.9/clang_64/lib/QtTest.framework/Headers -I../../../Qt5.9.0/5.9/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt5.9.0/5.9/clang_64/mkspecs/macx-clang -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -o group.o ../../QTSubDirs/QTConsoleApp/group.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,/Users/user1/Qt5.9.0/5.9/clang_64/lib -o test_user test_user.o test_group.o contact.o user.o group.o -F/Users/user1/Qt5.9.0/5.9/clang_64/lib -framework QtTest -framework Security -framework Foundation -framework ApplicationServices -framework IOKit -framework QtCore -framework DiskArbitration Undefined symbols for architecture x86_64: "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [11]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [11], char const*, char const*, char const*, int)", referenced from: TestGroup::copyOfGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName1() in test_group.o TestGroup::contactFromGroupSharesName2() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [1]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [1], char const*, char const*, char const*, int)", referenced from: TestUser::nullUserUriIsEmpty() in test_user.o TestUser::nullUserNameIsEmpty() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestGroup::nullGroupUriIsEmpty() in test_group.o TestGroup::nullGroupNameIsEmpty() in test_group.o TestGroup::initialNameForNamelessGroupIsEmpty() in test_group.o ... "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [20]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [20], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForNamedUser() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [22]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [22], char const*, char const*, char const*, int)", referenced from: TestUser::canInitUriWithCtorForeNamelessUser() in test_user.o TestUser::copyOfUserHasSameUri() in test_user.o TestUser::contactFromUserHasSameUri() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [23]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [23], char const*, char const*, char const*, int)", referenced from: TestGroup::canInitUriWithCtorForeNamelessGroup() in test_group.o TestGroup::canInitUriWithCtorForNamedGroup() in test_group.o TestGroup::copyOfGroupHasSameUri() in test_group.o TestGroup::contactFromGroupHasSameUri() in test_group.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [4]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [4], char const*, char const*, char const*, int)", referenced from: TestUser::canInitNameWithCtor() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o TestUser::contactFromUserHasSameName() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [6]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [6], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasUnset() in test_user.o "bool QTest::qCompare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char [7]>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const (&) [7], char const*, char const*, char const*, int)", referenced from: TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o TestGroup::canInitNameWithCtor() in test_group.o TestGroup::canChangeGroupNameIfWasUnset() in test_group.o ... "contact::name()", referenced from: TestUser::nullUserNameIsEmpty() in test_user.o TestUser::canInitNameWithCtor() in test_user.o TestUser::initialNameForNamelessUserIsEmpty() in test_user.o TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserHasSameName() in test_user.o ... "contact::setUri(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_user.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o user::user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test_group.o "contact::setName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: TestUser::cannotSetNullUserName() in test_user.o TestUser::canChangeUserNameIfWasUnset() in test_user.o TestUser::canChangeUserNameIfWasSet() in test_user.o TestUser::copyOfUserSharesName1() in test_user.o TestUser::copyOfUserSharesName2() in test_user.o TestUser::contactFromUserSharesName1() in test_user.o TestUser::contactFromUserSharesName2() in test_user.o ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [test_user] Error 1 make: *** [sub-Test-make_first] Error 2 16:15:35: The process "/usr/bin/make" exited with code 2. Error while building/deploying project QTSubDirs (kit: Desktop Qt 5.9.0 clang 64bit) When executing step "Make" 16:15:35: Elapsed time: 00:11.
-
Try removing
CONFIG += c++11
(it is now enabled by default since Qt 5.7) and do a full re-build. -
Try removing
CONFIG += c++11
(it is now enabled by default since Qt 5.7) and do a full re-build. -
@SGaist said in :-1: error: symbol(s) not found for architecture x86_64:
CONFIG += c++11
I removed the same and built the whole project after a clean but i still face the same issue. Is it necessary that my cpp files should extend QObject ?
-
@Dhara I don't know whether it is related, but why do you have these lines in your pro file:
stdlib -=libc++ stdlib -=libstdc++
You should try a simple project with unit tests to be sure it is working in general.
@jsulm @SGaist The issue was with diff arguments being passed. I cannot modify the test case which passes char * to QCOMPARE, but i dont know how to make a char * value be returned from a function using a string*, in other words i would like to convert string * to char * and without the const issues. How should i do that ?