14 votes

Downloading cs50.h

If you aren't going to use the appliance, you'll need both the cs50.c and cs50.h files. Here is cs50.c Here is cs50.h For specific OS-based instructions on how to use the CS50 Library in your own ...
user avatar
  • 18.3k
11 votes

How do I install the CS50 library to my local OS?

Here are the instructions for installing CS50 library in your OS: Linux First become root, as with: su - // Fedora, RedHat, CentOS sudo -s // Debian, Ubuntu, Mint //edited from sudo su -, use ...
user avatar
  • 1,140
11 votes

Undefined reference to `GetString'

A library's header file (the one that ends with the .h extension) doesn't contain function definitions. Instead, it contains the library's resources that are available for you to use. These resources ...
user avatar
  • 17.4k
10 votes
Accepted

How to Compile the CS50 Library on Another Linux Distro?

Compiling a library is not as easy as compiling an executable. Let's analyze the steps together. We need to compile our library source code into position-independent code (PIC): gcc -c -Wall -Werror ...
user avatar
  • 1,156
8 votes

How to Compile the CS50 Library on Another Linux Distro?

Update: please follow the instructions per https://github.com/cs50/libcs50#installation instead! A shorter answer could be this. Debian, Ubuntu First become root, as with: sudo su - ...
8 votes

Installing cs50.h on a Mac

Follow the steps below, and see if it helps... [Optional, you may choose to not install Xcode as long as you have any text editor] On a Mac, make sure you have installed Xcode first of all. It's ...
user avatar
  • 1,170
7 votes
Accepted

undefined reference to `GetInt'

First, you'll need to install the cs50 library. Follow this link for more information about how you can install the cs50 library on Fedora! Second, you need to link the library binary file by ...
user avatar
  • 17.4k
7 votes

Undefined reference to `GetString'

Did you compile it using make? If not (and why not?) did you remember to include the -lcs50 clang compile flag that links the library?
user avatar
  • 18.3k
7 votes

Undefined reference to `GetString'

Download the cs50 from: http://mirror.cs50.net/library50/c/library50-c-5.zip Extract it. (You will get two files cs50.c and cs50.h) Now copy both the files to your default library folder. (which ...
user avatar
5 votes
Accepted

How to add cs50 library in codeblocks

Just got it and posting if it might come to help. You got to do two things: A. Add library to the compiler: Right click on the project Click on the "Build options" Click on "Search Directory" Click ...
user avatar
5 votes

How do I install the CS50 library to my local OS?

An easier method is to use my CS50 tools setup if you're on Ubuntu or Fedora. Open a terminal in your download directory, and run sudo sh cs50_setup_ubuntu.sh or sudo sh cs50_setup_fedora.sh ...
user avatar
  • 136
5 votes

Undefined reference to `GetString'

I have had the same problem in CS50 2015 VMware appliance. I even include CS50.h library like that: #include<cs50.h> But I was keep getting error 1 of Undefined reference to `GetString' or '...
user avatar
5 votes

How do I get the cs50 appliance library to work

Did you follow the instructions in pset1 that said to run update50 first? There's an update that will fix your gedit built-in terminal to use the correct compiler commands. Also, jharvard@ubuntu is ...
user avatar
  • 18.3k
4 votes
Accepted

Why do I not have to link stdio.h while compiling with clang?

stdio.h is a header file from the C Standard Libraries, and their implementations are in the libc.a file, due to his common and extended use, this file is automatically linked by the compiler as if ...
user avatar
  • 1,359
3 votes

Where are header files located in the CS50 appliance?

First of all, these are not the libraries! These are known as libraries' header files (aka declaration files). You may have a look at this answer to learn a little bit more about them! The header ...
user avatar
  • 17.4k
3 votes
Accepted

gevents.h File Not Found

The required header files are included in both the pset4.zip and the src5m.zip. Bounce is part of the latter though, so I would say to just run unzip src5m.zip in your Dropbox folder again, and watch ...
user avatar
2 votes

Downloading cs50.h

Head over to https://github.com/cs50/libcs50. There you will find both files plus instructions for how to install the library so that you can compile your code with cs50.h included. If you're using ...
user avatar
2 votes

How to add cs50 library in codeblocks

Can confirm this works. Thank you for this! :)
user avatar
  • 21
1 vote
Accepted

cs50.sandbox doesn't see <cs50.h> library

Per the error message: did you mean get_string? There is no GetString in the CS50 library any more; it was changed a few years ago to get_string. Try that.
user avatar
  • 18.3k
1 vote
Accepted

Uninstall cs50 library

Just execute the following command $ sudo rm -f /usr/local/include/cs50.h /usr/local/lib/libcs50.a To install the latest version of the CS50 C library on Ubuntu, execute the following commands $ ...
user avatar
  • 17.4k
1 vote
Accepted

Difference between CS50::query() and query()

When you are using CS50 IDE with inbuilt CS50 SQL library files then it's easier to use CS50::query() function. In normal situations, eg in a linux machine, you can use only the query() function. ...
user avatar
1 vote

How to add cs50 library in codeblocks

Much appreciated! Worked perfectly. Only thing I would like to add is the library can be found here https://github.com/cs50/libcs50
user avatar
1 vote
Accepted

why am I unable to unzip the cs50 library?

Before you try to unzip the library, do you actually have the file on your computer? Have you verified it with ls command, or find -name library50*? My guess is that the file is not on your system. ...
user avatar
  • 63.1k
1 vote

How do I install the CS50 library to my local OS?

There is also instructions in the Github repo. But ensure to install rubygems before running gem install asciidoctor
user avatar
1 vote

Problem including cs50.h with Visual Studio 2013

In order to use the CS50 library, download it from here. Now, copy the files cs50.h and cs50.c to any arbitrary folder. Right click on the project, and got to Properties --> Configuration Properties ...
user avatar
  • 1,170

Only top scored, non community-wiki answers of a minimum length are eligible