Code doesn't compile on Ubuntu 21.04: ld returned 1 exit status
Tc14Hd opened this issue · 1 comments
Tc14Hd commented
When I run the command ./configure && make
, I get a long error message that ends with:
collect2: error: ld returned 1 exit status
make: *** [Makefile:31: cadet] Error 1
The full error message can be found here.
Am I doing something wrong or is this an actual problem? I am using GCC version 10.3.0 on Ubuntu 21.04.
player1537 commented
I believe the cause of this compile error is that src/log.h
needs to have extern
added before each of the variable declarations.
Specifically, lines 39-42 of src/log.h
should be changed from:
int debug_verbosity;
bool log_qdimacs_compliant;
bool log_colors;
bool log_silent;
to:
extern int debug_verbosity;
extern bool log_qdimacs_compliant;
extern bool log_colors;
extern bool log_silent;
This was tested and it seems to be working now.