Open forestpurnell opened 3 months ago
so simple i ran into this issue with my M2
just run the command like this
cc runoff.c -lcs50 -o runoff
because you need to link the cs50 library with the c compiler
Hi I faced the same problem. Can you elaborate what runoff.c is from and what is this doing explicitly?
Hi I faced the same problem. Can you elaborate what runoff.c is from and what is this doing explicitly?
Never mind, I figured it out. I just need to specify the source code file I am trying to make
and the output, so in my case, it's mario.c
and mario
for the -o
flag.
I wonder if this links the library to the compiler for all future invocations or just once and I would have to do this for every other source code files I have.
no it didnt link, each time i should run the command with -lcs50, but i think if u want it to be linked permenantly something should be added to the .zshrc or .bashrc depends on the CLI you are using..
Hi I faced the same problem. Can you elaborate what runoff.c is from and what is this doing explicitly?
Never mind, I figured it out. I just need to specify the source code file I am trying to
make
and the output, so in my case, it'smario.c
andmario
for the-o
flag.I wonder if this links the library to the compiler for all future invocations or just once and I would have to do this for every other source code files I have.
am at mario at the moment too! which version R u submitting the less OR more?
Hi I faced the same problem. Can you elaborate what runoff.c is from and what is this doing explicitly?
Never mind, I figured it out. I just need to specify the source code file I am trying to
make
and the output, so in my case, it'smario.c
andmario
for the-o
flag. I wonder if this links the library to the compiler for all future invocations or just once and I would have to do this for every other source code files I have.am at mario at the moment too! which version R u submitting the less OR more?
I am still following through the Section part of Week 1, so I am not aware of or familiar with what 'less OR more' problem you are talking about, sorry.
I tried modifying my zshrc
dotfile though based on the README but nothing happened; my compiler doesn't see the custom library. I had to copy and paste the .dylib
file to my working directory for my code to compile.
try adding this :
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
to the .zshrc and remove what you have previously added.
Assuming u have installed the libcs50 in its default location and didnt use custome install location for the cs50 library
@T1To48 @sufyazi @forestpurnell did any change to the environment variables helped with that issue? It seems that the default version for Make in MacOS is 3.18, a bit old. I wonder if that is part of the issue. Edit: It seems it should not be an issue; should be solved by modifying environment.
@diegovskytl mine works perfectly fine, but i dont run commands with make i use :
cc filename.c -lcs50 -o filename
Hello, after an error-free compile and install, the first time I try to compile a program with the libcs50 headers, I get this error:
Is there some reason this wouldn't be able to run on an arm64 mac?