Kangaroo
Kangaroo copied to clipboard
Ubuntu compilation error. Help needed
Good day.
How to solve this problem:
make gpu=1 ccap=20 all
cd obj && mkdir -p SECPK1
g++ -DWITHGPU -m64 -mssse3 -Wno-unused-result -Wno-write-strings -O2 -I. -I/usr/local/cuda-10.0/include -o obj/SECPK1/IntGroup.o -c SECPK1/IntGroup.cpp
SECPK1/IntGroup.cpp: In constructor 'IntGroup::IntGroup(int)':
[b]SECPK1/IntGroup.cpp:24:42: error: 'malloc' was not declared in this scope[/b]
subp = (Int *)malloc(size * sizeof(Int));
^
SECPK1/IntGroup.cpp: In destructor 'IntGroup::~IntGroup()':
[b]SECPK1/IntGroup.cpp:28:12: error: 'free' was not declared in this scope[/b]
free(subp);
^
Makefile:80: recipe for target 'obj/SECPK1/IntGroup.o' failed
make: *** [obj/SECPK1/IntGroup.o] Error 1`
???
Hi Try to add: #include <stdlib.h> in IntGourp.cpp
#include "IntGroup.h"
#include <stdlib.h>
using namespace std;
Enother error:
main.cpp:335:13: error: 'exit' was not declared in this scope exit(0);
How to fix it ?
Thx!
Try #include <stdlib.h> in main.cpp