LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-11-2018, 02:36 AM   #1
kroman
LQ Newbie
 
Registered: Aug 2018
Posts: 4

Rep: Reputation: Disabled
Code::Blocks can't find library


I have Code::Blocks 13.12 on linux Mint(18), when i create C project and go 'Build and run' i get this error: ||=== Build: Debug in projekatPrvi (compiler: GNU GCC Compiler) ===|
/home/darko/Desktop/C projekti/projekatPrvi/main.c|1|fatal error: stdio.h: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I understand that compiler couldn't find stdio.h lib, should i download it or i messed up when i created C project?
 
Old 08-11-2018, 03:24 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,119

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
I understand some stdio.h is missing. I just ran
Code:
locate stdio.h
and found 12 files calles stdio.h, so it unlikely you _actually_ don't have it. Check yourself by running
Code:
sudo updatedb
locate stdio.h
Further, my elementary programming knowledge tells me that if you put
Quote:
#include stdio.h
in a program, that references the one in /usr/include. Other directories have to be added, e.g.
Quote:
#include bits/stdio.h
What are you compiling for? 32/64 bit? x86/Arm/PowerPC? which stdio.h do you want? They ALL differ.

Last edited by business_kid; 08-11-2018 at 03:29 AM.
 
Old 08-11-2018, 04:00 AM   #3
kroman
LQ Newbie
 
Registered: Aug 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
I understand some stdio.h is missing. I just ran
Code:
locate stdio.h
and found 12 files calles stdio.h, so it unlikely you _actually_ don't have it. Check yourself by running
Code:
sudo updatedb
locate stdio.h
Tried that, only result i got was
Code:
/usr/lib/x86_64-linux-gnu/perl/5.22.1/CORE/nostdio.h
And compiling for 64bit. Sorry if i don't give enough info, i'm quite new to Linux tbh.
 
Old 08-11-2018, 04:25 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,971
Blog Entries: 5

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
Quote:
Originally Posted by kroman View Post
Tried that, only result i got was ...
then maybe you need to install some.
you didn't even tell us which distro you're running; on archlinux:
Code:
find / -name stdio.h 2>/dev/null | pacman -Qo -
/usr/include/bits/stdio.h is owned by glibc 2.28-1
/usr/include/isc/stdio.h is owned by bind-tools 9.13.0-3
/usr/include/c++/8.2.0/tr1/stdio.h is owned by gcc 8.2.0-2
/usr/include/wine/msvcrt/stdio.h is owned by wine 3.13-1
/usr/include/stdio.h is owned by glibc 2.28-1
/usr/include/bsd/stdio.h is owned by libbsd 0.9.1-1
but this is reproducible for all package managers.

PS:
you might benefit from trying to learn to compile this manually (terminal), instead of trying to fix codeblocks.

Last edited by ondoho; 08-11-2018 at 04:26 AM.
 
Old 08-11-2018, 05:18 AM   #5
kroman
LQ Newbie
 
Registered: Aug 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
then maybe you need to install some.
you didn't even tell us which distro you're running; on archlinux:
Code:
find / -name stdio.h 2>/dev/null | pacman -Qo -
/usr/include/bits/stdio.h is owned by glibc 2.28-1
/usr/include/isc/stdio.h is owned by bind-tools 9.13.0-3
/usr/include/c++/8.2.0/tr1/stdio.h is owned by gcc 8.2.0-2
/usr/include/wine/msvcrt/stdio.h is owned by wine 3.13-1
/usr/include/stdio.h is owned by glibc 2.28-1
/usr/include/bsd/stdio.h is owned by libbsd 0.9.1-1
but this is reproducible for all package managers.

PS:
you might benefit from trying to learn to compile this manually (terminal), instead of trying to fix codeblocks.
My bad.
Code:
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18.2
DISTRIB_CODENAME=sonya
DISTRIB_DESCRIPTION="Linux Mint 18.2 Sonya"
May you guide me how to install necessary package to fix my problem?
 
Old 08-11-2018, 05:42 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,971
Blog Entries: 5

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
Quote:
Originally Posted by kroman View Post
May you guide me how to install necessary package to fix my problem?
probably not in as much detail as you would like.

to continue the troubleshooting, run
Code:
find / -name stdio.h 2>/dev/null
then apply one of the solutions from here
to each output line, and show us the result.

Last edited by ondoho; 08-12-2018 at 01:14 AM.
 
Old 08-11-2018, 05:58 AM   #7
kroman
LQ Newbie
 
Registered: Aug 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
probably not in as much detail as you would like.

to continue the troubleshooting, run
Code:
find / -name stdio.h 2>/dev/null
Tried to run this in terminal, got this result:
Code:
bash: /dev/null: Permission denied
full msg:
Code:
[2] 9539
find: paths must precede expression: 2
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec|time] [path...] [expression]
gt: error: neither tool nor script specified; option -help lists possible tools
[2]-  Exit 1                  find / -name stdio.h 2
bash: /dev/null: Permission denied
 
Old 08-12-2018, 01:13 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,971
Blog Entries: 5

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
sorry about that.
i fixed the command in my previous post. it should've been '>', not '>'.
 
  


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
Code::Blocks build error: LD can't find -lgmon? jjc Programming 4 02-12-2011 01:28 AM
code::blocks 10.05 does not highlight code? michaelinux Linux - Software 1 10-24-2010 11:25 AM
Linux + Code Blocks + Shared Library + my Implementation = Not Working! morty346 Programming 1 04-27-2009 04:21 PM
Why wont code::blocks find glut.h h3x0r Programming 1 04-13-2007 01:59 PM

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

All times are GMT -5. The time now is 11:53 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