Skip to content

problem compiling #1

@noamharel161

Description

@noamharel161

Helllo,
I ran into an error in the compiling stage. When I run the command "make" I get the following error:

g++ -g3 -O3 -Wall -I /usr/local/include/gsl/ -std=c++0x -c calc_bottleneck.cpp
calc_bottleneck.cpp: In function ‘int CalcBottleneck(run_params)’:
calc_bottleneck.cpp:81:22: error: call of overloaded ‘isinf(double)’ is ambiguous
if (isinf(log(lL))) {
^
calc_bottleneck.cpp:81:22: note: candidates are:
In file included from /usr/include/features.h:375:0,
from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
from /usr/include/c++/4.8.2/iostream:38,
from shared_haps.h:2,
from calc_bottleneck.cpp:1:
/usr/include/bits/mathcalls.h:202:1: note: int isinf(double)
__MATHDECL_1 (int,isinf,, (Mdouble __value)) attribute ((const));
^
In file included from /usr/include/c++/4.8.2/random:38:0,
from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
from /usr/include/c++/4.8.2/algorithm:62,
from shared_haps.h:8,
from calc_bottleneck.cpp:1:
/usr/include/c++/4.8.2/cmath:608:3: note: constexpr bool std::isinf(long double)
isinf(long double __x)
^
/usr/include/c++/4.8.2/cmath:604:3: note: constexpr bool std::isinf(double)
isinf(double __x)
^
/usr/include/c++/4.8.2/cmath:600:3: note: constexpr bool std::isinf(float)
isinf(float __x)
^
calc_bottleneck.cpp: In function ‘void RemoveNotSeenPreTransmission(run_params, int&, std::vector&, std::vector&, std::vector<std::vector >&, std::vector<std::vector >&, std::vector&)’:
calc_bottleneck.cpp:136:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0;i<never_seen.size();i++) {
^
calc_bottleneck.cpp:146:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int k=0;k<never_seen.size();k++) {
^
calc_bottleneck.cpp:154:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int k=0;k<never_seen.size();k++) {
^
calc_bottleneck.cpp:171:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<var_pre_red.size();i++) {
^
calc_bottleneck.cpp:172:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0;j<var_pre_red[0].size();j++) {
^
calc_bottleneck.cpp:178:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<var_post_red.size();i++) {
^
calc_bottleneck.cpp:179:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0;j<var_post_red[0].size();j++) {
^
make: *** [Makefile:23: calc_bottleneck.o] Error 1

Does anyone know what the problem here is?
Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions