Solved

How to programming with GD library and C

Posted on 2004-08-06
6
841 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
  • 4
  • 2
6 Comments
 
LVL 45

Expert Comment

by:sunnycoder
Comment Utility
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
Comment Utility
nguyen_vantuananh,

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

Sunnycoder
0
 

Author Comment

by:nguyen_vantuananh
Comment Utility
But I use VC++ compiler on Windows. How do I link those library file.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 45

Expert Comment

by:sunnycoder
Comment Utility
tools->options->show directories for library files

add a path to gd library
0
 

Author Comment

by:nguyen_vantuananh
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Directory does exist 19 142
Is string constant address ? 10 189
Read file descriptor 3 in C 14 101
C language IDE – Compilers installation 14 58
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now