Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 918
  • Last Modified:

How to programming with GD library and C

rateup.obj : error LNK2001: unresolved external symbol _strtoll
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageDestroy@4
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImagePng@8
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageStringUp@24
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageSetStyle@12
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageRectangle@24
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageString@24
rateup.obj : error LNK2001: unresolved external symbol __imp__gdFontSmall
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageSetBrush@8
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageLine@24
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageInterlace@8
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageColorTransparent@8
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageColorAllocate@16
rateup.obj : error LNK2001: unresolved external symbol __imp__gdImageCreate@8
Debug/rateup.exe : fatal error LNK1120: 14 unresolved externals
Error executing link.exe.

rateup.exe - 15 error(s), 12 warning(s)
I experience above errors while compiling rate.c file
How can I fix those errors
0
nguyen_vantuananh
Asked:
nguyen_vantuananh
  • 4
  • 2
1 Solution
 
sunnycoderCommented:
Hi nguyen_vantuananh,

add -lgd -lpng -lz -ljpeg -lfreetype -lm to your compile command

for more details
http://www.boutell.com/gd/manual2.0.28.html#basics

Sunnycoder
0
 
sunnycoderCommented:
nguyen_vantuananh,

If you are not using any of the other libraries, then -lgd would suffice

Sunnycoder
0
 
nguyen_vantuananhAuthor Commented:
But I use VC++ compiler on Windows. How do I link those library file.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
sunnycoderCommented:
tools->options->show directories for library files

add a path to gd library
0
 
nguyen_vantuananhAuthor Commented:
Can you show me how I can get the GD library file for VC++.
I dowloaded bgd.dll but I'm not sure it is the library file for VC++.
If you can, please give me a detailed explanation
0
 
sunnycoderCommented:
http://www.boutell.com/gd/http/gdwin32.zip  << download this

and read this page which has answers to all your questions
http://www.boutell.com/gd/manual2.0.28.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now