LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-17-2009, 03:46 AM   #1
surya1006
LQ Newbie
 
Registered: Sep 2008
Posts: 3

Rep: Reputation: 0
undefined reference to 'printf'


I am trying to compile my code with the following:

[root@printer3 Obj]# gcc -O2 -o app Main.o ConsFunc.o PlxInit.o Connection.o Data_Handling_Thread.o Display_Data.o FPGA_Data.o Global_Data.o Keypad_Thread.o LibFunc.o Log_File.o NVRAM_Data.o Operation_Thread.o PCCMDI_Thread.o Printing_Data_Thread.o STPC_Thread.o Test_LibFunc.o Timer_Thread.o Wait_Pause_Thread.o PciApi.o PciDrvApi.o -L/usr/lib/libc.a -L/usr/lib/gcc/i386-redhat-linux/3.4.2/libgcc.a -lc -lm -lgcc -lpthread -lcrypt -lncurses


But am getting the following error message:

PlxInit.o(.text+0x26d): In function `SelectDevice':
: undefined reference to `Printf'
PlxInit.o(.text+0x297): In function `SelectDevice':
: undefined reference to `Printf'
PlxInit.o(.text+0x2c5): In function `SelectDevice':
: undefined reference to `Printf'
PlxInit.o(.text+0x3cc): In function `SelectDevice':
: undefined reference to `Printf'
collect2: ld returned 1 exit status

Please suggest what might be the problem and how to solve it.

Thanks.
 
Old 03-17-2009, 04:21 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Are you using the standard C printf() function? If so, it should be all lowercase (i.e. "printf", not "Printf").
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined reference, why? george_mercury Programming 4 05-07-2009 01:15 AM
undefined reference to... dimah Programming 3 12-27-2006 10:57 AM
undefined reference? Sharky01252 Programming 3 11-07-2006 12:36 PM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 04:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration