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. Linking Custom Libraries on Windows 7
Forum Updated to NodeBB v4.3 + New Features

Linking Custom Libraries on Windows 7

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 995 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.
  • J Offline
    J Offline
    jwomble
    wrote on last edited by
    #1

    Hello,
    I am working on a project that requires multiple modules to be implemented as libraries. I am using the Microsoft Visual toolkit.

    My library builds without errors, and I would like to statically link this library with my GUI project. I've added these lines to my GUI's .pro file:
    @INCLUDEPATH += $$PWD/../CttLibrary
    DEPENDPATH += $$PWD/../CttLibrary

    win32: LIBS += -L$$PWD/../CttLibrary-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug/debug/ -lCttLibrary

    win32: PRE_TARGETDEPS += $$PWD/../CttLibrary-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug/debug/CttLibrary.lib
    INCLUDEPATH += $$PWD/../CttLibrary-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug/debug
    DEPENDPATH += $$PWD/../CttLibrary-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug/debug@

    This lets me build the GUI project without problems, but when I try to run the program, I get this from the debugger:
    @ ModLoad: 0000000064790000 00000000647a5000 C:\Users\jwomble\Documents\JHUAPL\CttLibrary-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug\debug\CttLibrary.dll
    sProcess exited (3221225781)
    eProcess crashed@

    The path to CttLibrary.dll is correct (but why is it trying to load the DLL if I'm statically linking?), and I've tried to copy the library into the executable's directory. What's going on?

    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