Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Too smart qmake
Forum Updated to NodeBB v4.3 + New Features

Too smart qmake

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 1 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nen777w
    wrote on last edited by
    #1

    I have a header in project:

    @
    //fn_names.h
    #define FN_NAME foo
    #define FN_WNAME wfoo
    @

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

    @
    //foo_impl.c

    #include "fn_names.h"

    void
    #ifdef W
    FN_WNAME
    #else
    FN_NAME
    #endif
    () {}
    @

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

    @
    //w.c

    #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 +=
    w.c
    foo_impl.c
    @

    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?
    Thanks.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nen777w
      wrote on last edited by
      #2

      Post bug and my fixes here: https://bugreports.qt-project.org/browse/QTBUG-32993

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved