Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6627709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:02:45+00:00 2026-05-25T22:02:45+00:00

I have a problem in ‘c’ language inside compiling with gcc. I am using

  • 0

I have a problem in ‘c’ language inside compiling with gcc.

  1. I am using “Cygwin” with (gcc-core, gcc-g++, gdb, make & other supportive packages) inside windows xp.
  2. I installed “Cygwin” on this path “C:\Cygwin\”.
  3. My home directory: “C:\Cygwin\home\Bhanu Pratap”
  4. I copied “cs50.h” and “cs50.c” inside my working directory which is also under “C:\Cygwin\home\Bhanu Pratap”.

This is code inside my hello.c file

#include "cs50.h"
#include <stdio.h>
int
main(void){
  string name = "David";
  printf("O hai, %s!\n", name);
}

This is command under bash (Cygwin)

gcc -o hello hello.c -lc50

I get this error:

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/id: cannot find -lcs50
collect2: Id returned 1 exit status

Please help me where i am wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:02:46+00:00Added an answer on May 25, 2026 at 10:02 pm

    To be able to use -lcs50, you’ll first need to build that library (cs50) from its source code (cs50.c).

    Alternatively, you could simply:

    gcc -o hello hello.c cs50.c
    

    assuming cs50.c doesn’t have other dependencies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem creating new instance of excel 2007 using VBA (from Access 2002).
i have problem passing data from one page to another using GET, for example
i have problem in sending zip file in network.. all other formats i am
I have problem when i using ListView and Linq as datasource. The error down:
I have problem need to solved with Regex If i am using Firefox or
i have problem to set tabindex to FCK editor . i am using following
I have problem with one of my validation regex when using nonstandard utf-8 character.
have problem with ampersand (&) How to search for the words (or sentences) that
I have problem. I was using this code: Bundle parameters = new Bundle(); parameters.putString(message,
I have problem in some JavaScript that I am writing where the Switch statement

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.