Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 03-17-2009, 02:46 AM   #1
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.

Old 03-17-2009, 03:21 AM   #2
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").


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 12:15 AM
undefined reference to... dimah Programming 3 12-27-2006 09:57 AM
undefined reference? Sharky01252 Programming 3 11-07-2006 11:36 AM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 03:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 12:38 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:34 PM.

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