cs50 / libcs50

This is CS50's Library for C.
https://cs50.readthedocs.io/libraries/cs50/c/
GNU General Public License v3.0
1.79k stars 861 forks source link

Cannot use the library in Windows #297

Open carlo8767 opened 1 year ago

carlo8767 commented 1 year ago

Hi, I have followed the guideline : https://cs50.readthedocs.io/libraries/cs50/c/ in order to install the library inside the subsystem of Linux using Windows. Despite all it is still not recognize in Visual Studio Code. In detail the method get_char and get_string showed always this error : /usr/bin/ld: /tmp/ccGrlnGG.o: in function main': hello.c:(.text+0x1c): undefined reference toget_char' /usr/bin/ld: hello.c:(.text+0x46): undefined reference to `get_char' collect2: error: ld returned 1 exit status make: *** [:

I believe there is an error inside the file of the library: #include

Islam0mar commented 1 year ago

This is a linking error double check that you set LDLIBS="-lcrypt -lcs50 -lm" or add -lcs50 to compiler/linker flags.

augie909 commented 1 year ago

Having the same problem right now. It's been driving me crazy. Were you able to fix it?

naziaambreen commented 1 year ago

cs50 library is unaccessible please guide or take remote access and deploy

carlo8767 commented 1 year ago

Hi, I was able to find a workaround. The only way is to access it online because otherwise is impossible. @augie909 This is the link where you can connect your ide or online : https://cs50.dev/

MuhammadAhmad24 commented 1 year ago

@carlo8767 Yes you are right, This is the Only way to access it