Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Hot to add a library to .pro with Template = lib?
Forum Updated to NodeBB v4.3 + New Features

Hot to add a library to .pro with Template = lib?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 264 Views
  • 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.
  • L Offline
    L Offline
    leonardo M B
    wrote on last edited by
    #1

    I was using the GetProcessMemoryInfo function from the <psapi.h> header and included a LIBS += -lpsapi in the .pro file of the project, this project have a TEMPLATE = app. I noticed that I will have to use the GetProcessMemoryInfo in another file that is part of a project that its .pro have a TEMPLATE = lib. I Tryed adding LIBS += -lpsapi like in the other but it didn't work, it gives:
    error: undefined reference to `GetProcessMemoryInfo@12'

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      Did you re-run qmake after modifying the PRO file?

      Post the entire linker command line preceding the error message.

      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