LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   undefined reference to 'printf' (https://www.linuxquestions.org/questions/linux-software-2/undefined-reference-to-printf-712183/)

surya1006 03-17-2009 02:46 AM

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.

Nylex 03-17-2009 03:21 AM

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


All times are GMT -5. The time now is 12:04 AM.