-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in 'make' #82
Comments
See #77 |
Thanks for your so quick reply. I have little knowledge in C, you suggested to add #include to cafe/cafe_commands.cpp, what do you mean? |
Here, I opened that file using Sublime, we can see it as below, what should I add (just '#include') and where should I add? */ #include <stdio.h> #include "../config.h" #if defined(_OPENMP) #include "lambda.h" |
Add
Just after the line that says
|
collect2: error: ld returned 1 exit status |
Please show all the output from Make that you received. |
./configure 在函数中:In the function Thanks for your help! |
This indicates that the compiler you have is out of date - probably GCC 4.8? You would need to upgrade to at least 4.9. What operating system are you using? |
I'm sorry to reply you so late. I use Linux system, and everything was normal when my lab partner installed version 4. So is it because CAFE 4 was not so demanding of the compiler at the time? |
(base) C19DMGD:CAFE leyu$ make
g++ -c -Wall -std=c++11 -I cafe -I libtree -I libcommon -O3 -DNDEBUG -o release/cafe_commands.o cafe/cafe_commands.cpp
cafe/cafe_commands.cpp:1065:12: error: call to 'abs' is ambiguous
return std::abs(x - y) <= epsilon * std::abs(x);
^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdlib.h:132:6: note: candidate function
int abs(int) __pure2;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
cafe/cafe_commands.cpp:1065:41: error: call to 'abs' is ambiguous
return std::abs(x - y) <= epsilon * std::abs(x);
^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdlib.h:132:6: note: candidate function
int abs(int) __pure2;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
2 errors generated.
make: *** [release/cafe_commands.o] Error 1
The text was updated successfully, but these errors were encountered: