Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Compilation error: library not found #343

Open
richunorman-1 opened this issue Jun 3, 2022 · 1 comment
Open

Compilation error: library not found #343

richunorman-1 opened this issue Jun 3, 2022 · 1 comment

Comments

@richunorman-1
Copy link

I have build toolchain with the following configuration

../configure --prefix=$RISCV --with-arch=rv64imac_zba_zbb_zbc_zbs_zicsr_zifencei --with-cmodel=medany  --with-abi=lp64 --target=riscv64-unknown-elf --enable-languages=c --disable-libssp

Encountered the following error

~/Documents# riscv64-unknown-elf-gcc main.c -o main.elf
main.c:1:10: fatal error: stdio.h: No such file or directory
 
#include <stdio.h>
              ^~~~~~~~~
compilation terminated.
@richunorman-1 richunorman-1 changed the title Compilation error library not found Compilation error: library not found Jun 3, 2022
@alitariq4589
Copy link

This is standard library which is a part of riscv gnu toolchain when installed. I guess you have missed an error in the log. You can try adding absolute path to stdio.h and check if it solves your issue. I am using toolchain version 12.2.0 and my path is $INSTALLED_TOOLCHAIN_PATH/sysroot/usr/include/stdio.h

#include "$INSTALLED_TOOLCHAIN_PATH/sysroot/usr/include/stdio.h"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants