cs50/libcs50

Cannot use the library in Windows

carlo8767 opened this issue · 5 comments

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 to get_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 <cs50.h>

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

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

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

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/

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