C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-11-2009, 11:26 AM   #1
AYT
Registered User
 
Join Date: Jun 2009
Posts: 1
Unresolved External Symbol?

I'm trying to compile some source code I got from zaber at Software - ZaberWiki. The source code for the files is in the Zaber_C_Win32_Demo.zip download (C written console program for serial communication). I had to include all the libraries it asks for (winmm.lib is one of them) but when it stops saying it can't find the libraries (ie after I finish adding all the ones it needs into the linker), it gives me this:

-------------- Build: Release in asdfghjkl;' ---------------

Linking console executable: bin\Release\asdfghjkl;'.exe
main.obj : error LNK2019: unresolved external symbol _gotoxy referenced in function _Redraw
main.obj : error LNK2019: unresolved external symbol _clrscr referenced in function _main
main.obj : error LNK2019: unresolved external symbol _Sleep referenced in function _main
bin\Release\asdfghjkl;'.exe : fatal error LNK1120: 3 unresolved externals
Process terminated with status 1120 (0 minutes, 0 seconds)
4 errors, 0 warnings

Not sure how to fix this.

Please help. How do I get it to compile.

Thanks
AYT is offline   Reply With Quote
Old 06-11-2009, 12:58 PM   #2
+++ OK NO CARRIER
 
quzah's Avatar
 
Join Date: Oct 2001
Posts: 10,262
You need to include the header that has 'gotoxy', 'clrscr', 'Sleep', etc. They're not standard functions, and so you need the same compiler the original guy had, or one that provides those functions. Or you need to rewrite the program to not use those.


Quzah.
__________________
Hundreds of thousands of dipshits can't be wrong.


Are you up for the suck?
quzah is offline   Reply With Quote
Old 06-11-2009, 01:15 PM   #3
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,381
I don't know about Sleep(), but gotoxy() and clrscr() are old Turbo C++ functions. Barf. What kind of awful code is this?
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot
brewbuck is offline   Reply With Quote
Old 06-11-2009, 07:05 PM   #4
Deathray Engineer
 
MacGyver's Avatar
 
Join Date: Mar 2007
Posts: 3,211
Sleep() is from the Windows API.
__________________
MacGyver is offline   Reply With Quote
Reply

Tags
compile, linker

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling sample DarkGDK Program Phyxashun Game Programming 6 01-27-2009 03:07 AM
C++ std routines siavoshkc C++ Programming 33 07-28-2006 12:13 AM
Including lib in a lib bibiteinfo C++ Programming 0 02-07-2006 02:28 PM
Stupid compiler errors ChrisEacrett C++ Programming 9 11-30-2003 05:44 PM
debug to release modes DavidP Game Programming 5 03-20-2003 03:01 PM


All times are GMT -6. The time now is 06:21 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22