Solved

How to programming with GD library and C

Posted on 2004-08-06
6
859 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
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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C simple state machine for client server handshake 4 343
Socket Programming (Unix) 8 142
How to learn Linux? 10 67
Memory going from 12gb to 64gb or 96gb. worth it? 15 203
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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…
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.

808 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