Skip to content

Testing doesn't work on Windows #5

@BertrandDecoster

Description

@BertrandDecoster

You get the following error:

error: cannot find -lWidgetsLib
error: ld returned 1 exit status

because the .pro files are for Unix. I suggest you change the LIBS+= lines with this

CONFIG( debug, debug|release ) {
    LIBSUFFIX = d
    win32:LIBS += -L../WidgetsLib/debug -lWidgetsLib
    win32:PRE_TARGETDEPS += ../WidgetsLib/debug/libWidgetsLib.a
} else {
    LIBSUFFIX =
    win32:LIBS += -L../WidgetsLib/release
    win32:PRE_TARGETDEPS += ../WidgetsLib/release/libWidgetsLib.a
}
unix:LIBS += -L ../WidgetsLib
unix:PRE_TARGETDEPS += ../WidgetsLib/WidgetsLib$${LIBSUFFIX}.a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions