Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7197141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:54:53+00:00 2026-05-28T20:54:53+00:00

I just started using QT. Right now I need to transfer some code I

  • 0

I just started using QT. Right now I need to transfer some code I have on a Visual C++ project to QT.

The only thing the project does at the moment is open photoshop and set the visible flag to false (it will be used for automation, so a lot of things will be added later).

What I do is, I import 2 photoshop dlls (NOTE: I don’t have .h or .lib for them, just the .dll files)
The method I’m using to import these dlls is through import libid, since all the other methods I tried didn’t work. They are COM objects, btw.

This is my VC++ code:

//library ID of Photoshop.dll
#import "libid:E891EE9A-D0AE-4cb4-8871-F92C0109F18E" 
//library ID of PhotoshopTypeLibrary.dll
#import "libid:4B0AB3E1-80F1-11CF-86B4-444553540000" 

int main()
{
    Photoshop::_ApplicationPtr app( __uuidof(Photoshop::Application));
    app->Visible = false;

    return 0;
}

Now, I’m using the QT Creator with MinGW to compile this code, and it gives me some warnings and errors on the import lines:

warning: #import is a deprecated GCC extension
error: libid:E891EE9A-D0AE-4cb4-8871-F92C0109F18E: No such file or directory

And then, after that, it says (obviously) that “Photoshop” is not declared.

Now, I searched and the closest solution I found was to include the .tlh files that were created on my VC++ project, but when I did that, I got more than 1 thousand errors and warnings, so that obviously didn’t work.

Can someone please tell me what to do here? I’m seriously stuck!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:54:54+00:00Added an answer on May 28, 2026 at 8:54 pm

    #import is a Microsoft extension that you can use to import COM libraries in VisualC++.

    From your question it looks as if you have access to VisualC++ but that your QT code is compiled with gcc.

    If you create a simple project in VisualC++ you can add the #import code and compile it.
    You will find that the compiler has generated a .tlh and .tli file.
    These files contain all the information that you need to use the COM library and can be used by any compiler.

    You can then copy these files to your gcc project directory and use #include (not #import) on these generated files.

    The .tlh is equaivalent of a c++ header, the .tli is more like a .cpp file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have recently started programming for the iOS Platform but now I need some
I just started using rapidXML since it was recommended to me. Right now to
I just started an MVC 3 project using Forms Authentication. I have a web
Have just started using Google Chrome , and noticed in parts of our site,
I just started using SVN, and I have a cache directory that I don't
I just started using jqModal as I need support for nested modals. I'm noticing
I just started using the MVCContrib grid in a test project. I'm having a
I've only just started using Kohana ( 3 hours ago), and so far it's
I just started using eclipse for some personal projects and am finding the transition

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.