Skip to main content

Questions tagged [compiler]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
75 views

CS50-C compiler doesn't working

I can't run the code on cs50 C section is there something wrong with my compiler
user14288642's user avatar
1 vote
1 answer
356 views

Compiling Error: Make function not working

I'm just starting out, using VS code as my IDE. Here is my code #include <stdio.h> //here were are setting up a function //meow(void) means it takes no arguments //void at the beginning is ...
CAM_etal's user avatar
0 votes
1 answer
5k views

Why does it keep saying error: no such file or directory?

I am on part 1. The hello program worked and I'm trying to do the long int addition. It keeps saying "no such file or directory" but I can the the file with my own lion eyes and am stumped ...
Nancy Mills's user avatar
0 votes
1 answer
3k views

make: Nothing to be done for `caesar'

a quick look around shows that my error is usually related to someone attempting to compile a .c file but that is not my case here. I cant run make caesar on my program and I dont know why. [EDIT: ...
Darryl Calder's user avatar
0 votes
1 answer
113 views

Why C doesn't check for memory leaks automatically?

If there is a tool like valgrind which allows to prevent memory leaks in a program, why the compiler doesn't use it and gives you the appropriate warnings? It would be too slow?
Camilo's user avatar
  • 138
1 vote
1 answer
217 views

Declaring an Array - CS50 IDE

When I use a different compiler (i.e. Visual Studio), I can't declare an Array without a constant argument. I know that when declaring an Array without a constant, I must use a pointer. On the other ...
Davit Margvelashvili's user avatar
0 votes
1 answer
225 views

Fatal error: <cs50.h> file not included

I'm at pset3 and this error has never happened to me and it's pretty strange to me. When I 'make' the file in my IDE, I get no errors whatsoever and my program runs smoothly. However, when I upload ...
samidha's user avatar
  • 18
0 votes
2 answers
401 views

Why do we not have to link stdio?

In the video of compiler, we have to link the math library with hello.o with with the -lm flag. Why don't we have to link stdio library with hello.o?
Trương Quang Toàn's user avatar
0 votes
1 answer
59 views

For week 4 walkthrough unused variable even though I typed the same code as David

I type the same code as David, yet I get an unused window error and he doesn't. My code follows, and you can just as easily compare with his. #include <spl/gevents.h> #include <spl/gwindow....
Bill Carroll's user avatar
0 votes
1 answer
327 views

The compiler Clang isn't showing

The compiler Clang isn't showing and I'm at a complete lost of why it isn't. Please help me. bash: clang: command not found cs50
Stacey's user avatar
  • 1
0 votes
0 answers
301 views

week 4 | walkthroughs | button | compiler error "use of undeclared identifier 'GButton'"

make button » error: use of undeclared identifier 'GButton' jharvard@appliance (~/Dropbox/pset3): make button clang -ggdb3 -O0 -std=c99 -Wall -Werror button.c -lcs50 -lm -o button button.c:12:5: ...
daniel's user avatar
  • 63
5 votes
1 answer
2k views

How to install and compile the Stanford Portable Library on windows?

Self-explonatory title, I can't install the appliance for some reasons - Google just left me pretty confused - I would like to use the Stanford Portable Libray in a windows enviroment. I am using ...
someone's user avatar
  • 61
0 votes
2 answers
91 views

why always link library at the end of commands?

for this: Clang -ggdb -Wall -Werror hello.c -lcs50 -o hello if the library (such as cs50 library) is loaded and processed before source code ,then it's as if I didn't write the -lcs50 at all so ...
Sammy Jiang's user avatar
2 votes
1 answer
3k views

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

To compile this source code with clang, we had to link "cs50" library like this: clang hello.c -lcs50 but we did not have to link "stdio". why? /* hello.c */ #include <stdio.h> #include <...
Hakan As's user avatar
-1 votes
3 answers
593 views

I'm not going to use the appliance, what software should I install?

My HDD space Is tiny and the ram Is very slow, so what are the software to install to compensate for the appliance?
someone's user avatar
  • 61
0 votes
1 answer
655 views

"make" not working ("undefined reference to GetString")

I'm testing out a basic program called getname that prompts the user for their name to store it in a string variable. However make doesn't seem to work. This is make's output: jharvard@ubuntu:~$ ...
Tan 's user avatar
  • 1
0 votes
2 answers
353 views

Test program compiles with <math.h>, speller.c shows error

I've edited the pset6 Makefile to include all headers, and was careful not to edit any spaces or tabs. When I try to compile speller, I get the following error: make: *** No rule to make target `math....
Erin Magner's user avatar
0 votes
1 answer
54 views

Trying to compile f2c.c from walkthrough week1 without success [duplicate]

I'm trying to compile the programming from the walkthrough week1 f2c but it doesn't work. I don't know what I'm doing wrong. When I type in "make f2c" it returns *** No rule to make target `f2c'. ...
Socratesloco's user avatar
1 vote
2 answers
591 views

Code in "Compilers" video shows several ^@^@^@ lines as an example of machine code. Shouldn't it be binary code?

On week 1 short video "Compilers reources", at 5'06'' they show the "assembled file" (machine code the assembler produces from the assembly code). Screenshot: We've been taught that machine code is ...
Martin's user avatar
  • 201
2 votes
1 answer
679 views

How does the Makefile from pset 6 work?

Could someone help provide clarity in the matter of the Makefile used for pset 6? I understand everything up to line 32, that is where it gets confusing. Here the dependencies for the program $(EXE) ...
Axel Kennedal's user avatar
-8 votes
2 answers
856 views

mario8.c Clang compiling errors

Being a novice to C language programming,my initial attempts consisted of several syntax errors. As per the advice hence I have been reading the lecture notes concentrating on syntax and wanted to ...
uma1966's user avatar
  • 199
4 votes
1 answer
414 views

Computing speed difference between n++ and n=n+1 in C

I am curious to know the computing speed difference between n++ and n=n+1 in C. I found a rather lengthy discussion on Stack Overflow, where some people are literally contradicting each other. To ...
uma1966's user avatar
  • 199
0 votes
2 answers
961 views

Compiler errors while using Clang [duplicate]

I have been using Clang Compiler and check50 to write the programs in pset1 i.e hello.c and greedy.c I have found that check50 appears to say that hello.c and greedy.c compile ,even though the Clang ...
uma1966's user avatar
  • 199
13 votes
2 answers
2k views

What does the linker do?

If pre-processor copies the code from library to my source code, and then compiles the combined code, that should mean, that with my code, the library is also compiled, and linked. What does the ...
Dusan Milosevic's user avatar
0 votes
2 answers
139 views

C language Libraries are precompiled. Then how is it linked in a different processor based computer?

Libraries are pre-compiled, whether they are static or dynamic. Thus if I compile a library in my computer (say an intel processor), how is my library going to help or "understood" when it is linked ...
user1300's user avatar
2 votes
2 answers
6k views

What does -std=c99 command do?

When I run make, I see a lots of clang commands. I know the meaning of all of them except -std=c99. So, what does this command do?
Dusan Milosevic's user avatar
1 vote
1 answer
2k views

What's the difference between #include <abc.h> and #include "abc.h"

I know this might sound a little unrelated, but, while working on hacker3, I created my own implementation of A* and had decided to keep it seperate from the main program to ensure I can still mess up ...
Nib's user avatar
  • 1,176