Using Breakpad Windows Library files with Qt application, produces the following error: main.obj:-1: error: LNK2019: unresolved external symbol google



  • Hi,

    I'm trying to integrate Google breakpad with my application in both Linux and Windows. I've had no problems with the Linux integration, however I'm having an issue with the breakpad library files for the Windows implementation of my application.

    Please note I had already changed the setting "Treat WChar_t As built in Type" and set it to "No(/Zc:wchar_t-)" in Microsoft Visual C++ 2010 Express, Despite this I'm still presented with the same error when compiling my application. I had also tried to set the runtime library to "Multi-threaded Debug DLL(/MDd), this caused the breakpad client libaries to fail to build.

    Below is the qt .pro file:

    QT += core gui
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = CrashReportSystem
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    testcrash.cpp
    fileoperations.cpp
    crashsystemstartup.cpp

    HEADERS += mainwindow.h
    callback.h
    testcrash.h
    fileoperations.h
    crashsystemstartup.h

    FORMS += mainwindow.ui

    BREAKPAD=C:/google-breakpad
    INCLUDEPATH +=$${BREAKPAD}/src

    QMAKE_LIBDIR += $${BREAKPAD}/src/client/windows/Debug/lib
    LIBS += -lcommon
    LIBS += -lcrash_generation_client
    LIBS += -lexception_handler

    What steps will reproduce the problem?

    1. Using settings for all 11 projects that make up the breakpad_client Solution in configuration settings: C/C++ Language "Treat WChar_t As built in Type set to "No(/Zc:wchar_t-) and under C/C++ Code Generation Runtime Library "Multi-threaded Debug(/MTd)"

    2. Build breakpad_client Solution file in Microsoft Visual C++ Build succeeded on all 11 projects.

    3. In Qt build the application LNK2019 error appears.

    What is the expected output? What do you see instead?

    the creation of the .dmp file from a function that simulates a crash.

    What version of the product are you using? On what operating system?

    OS: Windows 7 Professional 64 bit edition

    To build the breakpad_client libraries

    Microsoft Visual C++ 10 Version: 10.0.30319 RTMRel
    Microsoft .NET Framework Version 4.0.30319 RTMRel

    Active Solution Confederation: Debug
    Active Solution platform: Win32

    Compiler: Microsoft Visual C++ Compiler 10.0 (x86)

    Compiling and Running the application

    Qt Creator 2.7.1
    based on Qt 4.8.4(32 bit)

    Using compiler Microsoft Visual C++ Compiler 10.0 x86

    Please provide any additional information below.

    The code below is where the error occurs

    std::wstring pathAsStr = (const wchar_t*)pwd.utf16();

    static google_breakpad::ExceptionHandler* handler;

    handler = new google_breakpad::ExceptionHandler
            (
                pathAsStr,
                /*FilterCallback*/ 0,
                dumpCallback,
                /*context*/
                0,
                true
                );
    

    Error output in Full:

    main.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl google_breakpad::ExceptionHandler::ExceptionHandler(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,bool (__cdecl*)(void *,struct _EXCEPTION_POINTERS *,struct MDRawAssertionInfo ),bool (__cdecl)(unsigned short const *,unsigned short const *,void *,struct _EXCEPTION_POINTERS *,struct MDRawAssertionInfo *,bool),void *,int)" (??0ExceptionHandler@google_breakpad@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@P6A_NPEAXPEAU_EXCEPTION_POINTERS@@PEAUMDRawAssertionInfo@@@ZP6A_NPEBG5123_N@Z1H@Z) referenced in function main

    File not found main.obj


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.