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

  • Home
  • SEARCH
  • 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 8288041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:11:53+00:00 2026-06-08T12:11:53+00:00

I wrote a small image processing algorithm using the CImg library and bundled it

  • 0

I wrote a small image processing algorithm using the CImg library and bundled it in a command line application using Visual C++ Express. Everything compiled error free and ran well, until the engineer in charge of the project decided he wanted a GUI. So I went to Qt and Qt creator. The GUI functioned fine by itself, but all hell breaks loose when I move my image processing algorithm over.

mainwindow.obj : error LNK2019: unresolved external 
symbol__imp__SHGetSpecialFolderPathA@16 referenced in function "char const * __cdecl 
cimg_library::cimg::programfiles_path(char const * const,bool)" 
(?programfiles_path@cimg@cimg_library@@YAPBDQBD_N@Z)

mainwindow.obj : error LNK2019: unresolved external symbol 
__imp__EnumDisplaySettingsW@12 referenced in function "public: static int __cdecl  
cimg_library::CImgDisplay::screen_width(void)" 
(?screen_width@CImgDisplay@cimg_library@@SAHXZ)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow@4    
referenced in function "public: struct cimg_library::CImgDisplay & __thiscall  
cimg_library::CImgDisplay::assign(void)" 
(?assign@CImgDisplay@cimg_library@@QAEAAU12@XZ)

mainwindow.obj : error LNK2019: unresolved external symbol   
__imp__ChangeDisplaySettingsW@8 referenced in function "public: void __thiscall 
cimg_library::CImgDisplay::_desinit_fullscreen(void)" 
(?_desinit_fullscreen@CImgDisplay@cimg_library@@QAEXXZ)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 
referenced in function "public: struct cimg_library::CImgDisplay & __thiscall 
cimg_library::CImgDisplay::resize(int,int,bool)" 
(?resize@CImgDisplay@cimg_library@@QAEAAU12@HH_N@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 
referenced in function "public: struct cimg_library::CImgDisplay & __thiscall 
cimg_library::CImgDisplay::resize(int,int,bool)" 
(?resize@CImgDisplay@cimg_library@@QAEAAU12@HH_N@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 
referenced in function "public: static unsigned long __stdcall 
cimg_library::CImgDisplay::_events_thread(void *)" 
(?_events_thread@CImgDisplay@cimg_library@@SGKPAX@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__GetMessageW@16 
referenced in function "public: static unsigned long __stdcall 
cimg_library::CImgDisplay::_events_thread(void *)" 
(?_events_thread@CImgDisplay@cimg_library@@SGKPAX@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongW@12 
referenced in function "public: static unsigned long __stdcall 
cimg_library::CImgDisplay::_events_thread(void *)" 
(?_events_thread@CImgDisplay@cimg_library@@SGKPAX@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced 
in function "public: static unsigned long __stdcall  
cimg_library::CImgDisplay::_events_thread(void *)" 
(?_events_thread@CImgDisplay@cimg_library@@SGKPAX@Z)

mainwindow.obj : error LNK2019: unresolved external symbol 
__imp__SetForegroundWindow@4 referenced in function "public: static unsigned long 
__stdcall cimg_library::CImgDisplay::_events_thread(void *)" 
(?_events_thread@CImgDisplay@cimg_library@@SGKPAX@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 
referenced in function "public: static unsigned long __stdcall 
cimg_library::CImgDisplay::_events_thread(void *)" 
(?_events_thread@CImgDisplay@cimg_library@@SGKPAX@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 
referenced in function "public: static unsigned long __stdcall 
cimg_library::CImgDisplay::_events_thread(void *)" 
(?_events_thread@CImgDisplay@cimg_library@@SGKPAX@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 
referenced in function "public: static long __stdcall 
cimg_library::CImgDisplay::_handle_events(struct HWND__ *,unsigned int,unsigned 
int,long)" (?_handle_events@CImgDisplay@cimg_library@@SGJPAUHWND__@@IIJ@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__ShowCursor@4 
referenced in function "public: static long __stdcall 
cimg_library::CImgDisplay::_handle_events(struct HWND__ *,unsigned int,unsigned 
int,long)" (?_handle_events@CImgDisplay@cimg_library@@SGJPAUHWND__@@IIJ@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__TrackMouseEvent@4 
referenced in function "public: static long __stdcall 
cimg_library::CImgDisplay::_handle_events(struct HWND__ *,unsigned int,unsigned 
int,long)" (?_handle_events@CImgDisplay@cimg_library@@SGJPAUHWND__@@IIJ@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__PeekMessageW@20 
referenced in function "public: static long __stdcall 
cimg_library::CImgDisplay::_handle_events(struct HWND__ *,unsigned int,unsigned 
int,long)" (?_handle_events@CImgDisplay@cimg_library@@SGJPAUHWND__@@IIJ@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 
referenced in function "public: static long __stdcall 
cimg_library::CImgDisplay::_handle_events(struct HWND__ *,unsigned int,unsigned 
int,long)" (?_handle_events@CImgDisplay@cimg_library@@SGJPAUHWND__@@IIJ@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__GetWindowLongW@8 
referenced in function "public: static long __stdcall 
cimg_library::CImgDisplay::_handle_events(struct HWND__ *,unsigned int,unsigned 
int,long)" (?_handle_events@CImgDisplay@cimg_library@@SGJPAUHWND__@@IIJ@Z)

mainwindow.obj : error LNK2019: unresolved external symbol __imp__SetDIBitsToDevice@48 
referenced in function "public: struct cimg_library::CImgDisplay & __thiscall 
cimg_library::CImgDisplay::paint(void)" (?paint@CImgDisplay@cimg_library@@QAEAAU12@XZ)

debug\final.exe : fatal error LNK1120: 20 unresolved externals

NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC  
\BIN\link.EXE"' : return code '0x460'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC  
\BIN\nmake.exe"' : return code '0x2'

Stop.

My problem now, is I have no idea why I’m having linker trouble. The CImg library is a single H file. It’s part of the project and included. I know Qt Creator needs libraries added to the project file, but what is there to add? My library is already listed under headers.

Here is the project file.

QT       += core gui

TARGET = final
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h \
    C:/includes/CImg.h

FORMS    += mainwindow.ui

INCLUDEPATH += C:\includes\

Thanks for the assistance, I’m primarily an embedded systems programmer, and working out of my C and assembly element is getting very frustrating.

  • 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-06-08T12:11:54+00:00Added an answer on June 8, 2026 at 12:11 pm

    You need to link the Cimg library to you GUI program. Add the library in your .pro file.

    LIBS += -L$PATH_TO_CIMG_LIB -l$CIMG_LIB
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a small express.js based web app. I serve a manifest.webapp but express.js
I wrote a small internal web app using (a subset of) pylons . As
I wrote some small apps using .NET 3.5 but now I am stuck with
I wrote a small app that turns out to be using a lot of
I am writing a small image/video upload program using WCF REST. Ideally, I would
I've been writing an image processing algorithm now, and at some point I needed
i wrote a small program to crop an image that is stored in the
I wrote a small application to use as a sandbox for testing ideas that
Hi every one, i wrote some code to crop large image to small one.
Okay I have a small app for uploading an image (using phonegap, Jquery). I

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.