Take the 2-minute tour ×

I tried to compile a simple basic c program in ubuntu 11.10 but i got the following error.

Here i am providing the error details,

pavan@pavan-Aspire-4739:~$ gcc -o simplelq pro.c

/tmp/ccR5XApx.o: In function `main': pro.c:(.text+0xf): undefined reference to `Printf'
collect2: ld returned 1 exit status

Can anyone please tell me if i still need to install any libraries

Note: I installed Ubuntu recently. I installed gcc also

share|improve this question
Maybe you meant printf instead of Printf. Some code to look at wouldn't hurt. –  Michael Foukarakis Jan 3 '12 at 17:09
And compile with -Wall. This will catch many errors like that. –  elmo Jan 3 '12 at 17:11
add comment

closed as too localized by Michael Petrotta, Dour High Arch, Vlad Lazarenko, Udo Held, Michael Foukarakis Jan 3 '12 at 19:18


3 Answers

The function is called printf, not Printf.

And "your test program" is hardly "any C program"...

share|improve this answer
Oops, Thank u TheifMaster i didn't check that one. –  lovelyguyalone Jan 3 '12 at 17:12
add comment

There is no Printf function in standard C. Since C allows implicitly declared functions, you are failing at linking stage. Read warning and error messages carefully.

share|improve this answer
add comment

It's printf not Printf the c programming language is case sensitive.

Here is a list of the C standard headers and functions.

share|improve this answer
add comment
