SaptakBhoumik / Peregrine

A blazing fast language for the blazing fast world(WIP)
https://peregrine-lang.github.io/
Mozilla Public License 2.0
1.46k stars 76 forks source link

temp.cc:2:10: fatal error: 'cstdlib' file not found #138

Closed pikhovkin closed 1 year ago

pikhovkin commented 1 year ago

Describe the bug

temp.cc:2:10: fatal error: 'cstdlib' file not found
#include <cstdlib>
         ^~~~~~~~~
1 error generated.

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/peregrine-lang/Peregrine.git
  2. Go to 'Peregrine' folder
  3. Run commands 'meson builddir' -> 'cd builddir' -> 'ninja'
  4. Compile './peregrine.elf compile ../can_comp.pe'
  5. See error above

Desktop (please complete the following information):

SaptakBhoumik commented 1 year ago

It is because clang is unable to find cstdlib for some reason. This header file is usually installed by default but still make sure it exists. If it does exist then use the following command (make sure u have g++ for this)

./peregrine.elf -cc g++ compile ../can_comp.pe 

Do let me know if it worked

pikhovkin commented 1 year ago

it works! @SaptakBhoumik thank you!