v icon indicating copy to clipboard operation
v copied to clipboard

Code of compiling V from source isn't working

Open Kapelianovych opened this issue 7 years ago • 5 comments

I have macOS 10.14.5 and I tried to build V from the source. First of all

cd v/compiler

doesn't working, because compiler directory hasn't been created. Then I had to install wget, because macOS haven't it(

brew install wget

And when I run

cc -w -o vc v.c
  • I have got this:
v.c:2:1: error: expected identifier or '('
<!DOCTYPE html>
^
v.c:117:1: error: expected identifier or '('
.wip {
^
v.c:132:1: error: expected identifier or '('
.note {
^
v.c:135:1: error: expected identifier or '('
</style>
^
v.c:147:1: error: unknown type name 'document'
document.addEventListener("DOMContentLoaded", function(event) { 
^
v.c:147:9: error: expected identifier or '('
document.addEventListener("DOMContentLoaded", function(event) { 
        ^
v.c:155:1: error: unknown type name 'function'
function prev() {
^
v.c:156:2: error: non-void function 'prev' should return a value [-Wreturn-type]
        return;
        ^
v.c:157:1: error: use of undeclared identifier 'ex_id'
ex_id--; 
^
v.c:158:5: error: use of undeclared identifier 'ex_id'
if (ex_id < 1) ex_id = nr_exs; 
    ^
v.c:158:16: error: use of undeclared identifier 'ex_id'
if (ex_id < 1) ex_id = nr_exs; 
               ^
v.c:159:12: error: expected ';' after expression
update_ex()
           ^
           ;
v.c:162:1: error: unknown type name 'function'
function next() {
^
v.c:163:2: error: non-void function 'next' should return a value [-Wreturn-type]
        return;
        ^
v.c:165:1: error: use of undeclared identifier 'ex_id'
ex_id++; 
^
v.c:166:5: error: use of undeclared identifier 'ex_id'
if (ex_id > nr_exs) ex_id = 1; 
    ^
v.c:166:21: error: use of undeclared identifier 'ex_id'
if (ex_id > nr_exs) ex_id = 1; 
                    ^
v.c:167:12: error: expected ';' after expression
update_ex()
           ^
           ;
v.c:170:1: error: unknown type name 'function'
function update_ex() { 
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

And program exits.

Kapelianovych avatar Jun 22 '19 17:06 Kapelianovych

Check the repository. It doesn't look like the source has been pushed yet.

zac-garby avatar Jun 22 '19 18:06 zac-garby

Where did you get this?

Jackojc avatar Jun 22 '19 18:06 Jackojc

Oh wait it's just HTML lol

Jackojc avatar Jun 22 '19 18:06 Jackojc

The source hasn't been pushed yet indeed. The URL you are pulling in with wget, contains a website instead of the source.

Bowero avatar Jun 22 '19 18:06 Bowero

Yeah... I see. I am closing the issue. Thanks)

Kapelianovych avatar Jun 22 '19 18:06 Kapelianovych