Too smart qmake

  • I have a header in project:

    #define FN_NAME foo
    #define FN_WNAME wfoo

    And c-file where is foo/wfoo implemented as:


    #include "fn_names.h"

    #ifdef W
    () {}

    For get in output library this function with to different names I have a file:


    #define W //compile w-function
    #include "foo_impl.c"

    If I use for example (MSVC (visual studio)) it compile w.c and foo_impl.c files separetly.
    As result I have
    w.obj — with: wfoo()
    and foo_impl.obj with foo()
    (same function but with two different names)

    But! When I use *.pro file I describe it like:

    SOURCES +=

    BUT qmake generate (eliminate foo_impl.c from ) the Makefile without separate compilation for foo_impl.c only for w.c

    How to disable this behavior?

Log in to reply

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