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 588473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:19:19+00:00 2026-05-13T15:19:19+00:00

I have to use the gdLibrary ( http://www.libgd.org ) in a C++ App on

  • 0

I have to use the gdLibrary (http://www.libgd.org) in a C++ App on MS Windows XP Prof. SP3 32bit – and I’m trying and googleing for two days now without success. Does anyone of you use libgd with MS VC++ 200x EE?

My problem: It has to to compile with MS Visual C++ (e.g. the 2008 Express Edition – fixed 3rd party condition)… but currently the linker crashes, with 11 of the following LNK2019 errors:

Linking…
codereate.obj : error LNK2019: An undefined external symbol “_gdImageDestroy” was found in “public: virtual __thiscall CodeCreate::~CodeCreate(void)”

The other smybols are _gdImageColorExact, _gdImageCopyResized and some other gd-functions. It seems that the VC++ linker does not work correctly with the bgd.lib provided by the package I downloaded from http://www.libgd.org/releases/gd-latest-win32.zip.

What I did/tried:

  1. Extracted gd-latest-win32.zip to c:\users\johndoe\cpp\libgd.
  2. Defined c:\users\johndoe\cpp\libgd\lib als additional library dir (global VC++ setting)
  3. Defined c:\users\johndoe\cpp\libgd\include as additional includes dir (global VC++ setting)
  4. Defined c:\users\johndoe\cpp\libgd\include\lib\bgd.lib as additional linker\input dependency (project setting)
  5. I even added #pragma comment(lib, "libgd.lib") into my codecreate.h to be on the save side.

Any suggestions? What am I doing wrong (e.g. have I forget to install something)? Is there any “trick” to get a VC++ 2008 compatible bgd.lib?

Additional notes:

  1. Running on Linux/g++, everything works fine, no warnings with -pedantic -ansi -wAll. The program does its job an generates some barcodes.
  2. It works when using DevC++ for Win32. Therefore it is no Windows issue, “just” a VC++ issue. For DevC++ I did:
    • I just downloaded http://www.libgd.org/releases/gd-latest-win32.zip,
    • extracted it to c:\users\johndoe\cpp\libgd
    • added c:\users\johndoe\cpp\libgd\lib\bgd.lib as additional obbject in the linker-projects settings.
    • defined c:\users\johndoe\cpp\libgd\lib als additional library dir,
    • defined c:\users\johndoe\cpp\libgd\include as additional includes dir
    • happy about some barcode stuff
  3. If I can’t get It working, I’m really in trouble… becoming really desperate right now 🙁
  • 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-13T15:19:19+00:00Added an answer on May 13, 2026 at 3:19 pm

    Did you put NODLL definition in your project? If you did that, you should use bgd_a.lib instead. And you also need to make sure you have defined WIN32.

    I tried to create a simple project with latest release and it does linked success. If I add NODLL without changing tot bgd_a then I get the same error message.

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

Sidebar

Related Questions

I have use web service in my windows application. webservice return string like: <b>sdfsdf</b>
I have use AVQueuePlayer to play two video at the same time, Now I
I want to have use something like this: http://localhost/test/dummy instead of this: http://localhost/test/profile.php?id=dummy I
I have use these code to upload two images in folder of the root
I have use include ('base.php') script in my other scripts ( more.php ). Now
I have use the TryUpdateModel method on the controllers but now I need to
Hello I have use DOMDocs in the past but I am stuck how to
I am working on a website on which we have use parallax effect. In
I'm just starting to learn AspectJ, and I have use-case for say, User login.
I have a use case where I need to call a (non-static) method in

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.