Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to import .net dll libraries in project
Qt 6.12 LTS is out! See what's new in the release blog

how to import .net dll libraries in project

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 680 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.
  • E Offline
    E Offline
    emazed
    wrote on last edited by
    #1

    Hi,

    i need to inlcude dll files that usually are used with Visual C++ or c++/cli or similiar, these dll comes with ".tlb" files, and i tried to include these, but i get an error. I wrote in my include.h file:

    #import "mydll.tlb" no_namespace
    

    and i got following error message:

    mydll.tlb:1:1: error: unknown type name 'MSFT'

    why can t read and import .tlb file?? Anyone has same issue?

    Ty

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, make sure you're using an MSVC compiler (and not the MinGW)
      Try putting the #import statement in one of your .cpp files instead of an .h file. Also try it without the no_namespace suffix

      1 Reply Last reply
      4
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        Also make sure you are compiling with the /clr option on

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        2

        • Login

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