Giter VIP home page Giter VIP logo

malcc's People

Contributors

niktob560 avatar seven1m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

malcc's Issues

Unable to compile

Can't compile code from master: redefinition of BLANK_LINE

$ make all -j1
gcc -Itinycc -Wall -Wextra -Werror -g   -c -o step0_repl.o step0_repl.c
gcc   step0_repl.o  -ledit -ltermcap -lgc -lpcre -ldl -o step0_repl
gcc -Itinycc -Wall -Wextra -Werror -g   -c -o step1_read_print.o step1_read_print.c
gcc -Itinycc -Wall -Wextra -Werror -g   -c -o hashmap.o hashmap.c
gcc -Itinycc -Wall -Wextra -Werror -g   -c -o printer.o printer.c
gcc -Itinycc -Wall -Wextra -Werror -g   -c -o reader.o reader.c
gcc -Itinycc -Wall -Wextra -Werror -g   -c -o types.o types.c
gcc -Itinycc -Wall -Wextra -Werror -g   -c -o util.o util.c
gcc   step1_read_print.o hashmap.o printer.o reader.o types.o util.o  -ledit -ltermcap -lgc -lpcre -ldl -o step1_read_print
/usr/bin/ld: printer.o:/tmp/malcc/printer.h:7: повторное определение «BLANK_LINE»; step1_read_print.o:/tmp/malcc/printer.h:7: здесь первое определение
/usr/bin/ld: reader.o:/tmp/malcc/printer.h:7: повторное определение «BLANK_LINE»; step1_read_print.o:/tmp/malcc/printer.h:7: здесь первое определение
/usr/bin/ld: types.o:/tmp/malcc/printer.h:7: повторное определение «BLANK_LINE»; step1_read_print.o:/tmp/malcc/printer.h:7: здесь первое определение
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
make: *** [<встроенное>: step1_read_print] Ошибка 1

My workaround:

diff --git a/printer.h b/printer.h
index 5b2674b..bbf4ce0 100644
--- a/printer.h
+++ b/printer.h
@@ -4,7 +4,7 @@
 #include "hashmap.h"
 #include "types.h"
 
-char *BLANK_LINE;
+extern char *BLANK_LINE;
 
 char* pr_atom(MalType *val, int print_readably);
 char* pr_str(MalType *val, int print_readably);
(END)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.