Solved

How to programming with GD library and C

Posted on 2004-08-06
6
866 Views
Last Modified: 2008-01-09
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
Comment
Question by:nguyen_vantuananh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11733643
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
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11733648
nguyen_vantuananh,

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

Sunnycoder
0
 

Author Comment

by:nguyen_vantuananh
ID: 11749524
But I use VC++ compiler on Windows. How do I link those library file.
0
Independent Software Vendors: 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!

 
LVL 45

Expert Comment

by:sunnycoder
ID: 11750126
tools->options->show directories for library files

add a path to gd library
0
 

Author Comment

by:nguyen_vantuananh
ID: 11759078
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
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 11808898
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question