#487 closed defect (invalid)
Error with lemon/math.h and cmath
Reported by: | Seth | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | blocker | Milestone: | LEMON 1.4 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
I am still trying to compile the base test file included in the tutorial and whenever I go about doing so I get an error with the floor and ceiling calls in the included lemon/math.h file. Specifically I am getting a long list of errors from cmath saying that for example, "error C2039: 'acosf' : is not a member of '`global namespace". Is there any quick solution to this? I am using lemon-1.3.
Attachments (1)
Change History (6)
Changed 11 years ago by
Attachment: | a16b2b2a8c4e.patch added |
---|
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Thanks for your response.
I tried using the patch attached, but it didn't seem to make any difference. The code I am currently trying to compile is just the test file included in section two of the LEMON tutorial. The issue that I am coming across seems to be when I call namespace lemon
the lemon/math.h
header file is being called, which then calls cmath
, cmath
then calls Microsoft's math.h
header file which should include the functions acosf()
etc.. But I am getting a collision with lemon/math.h
and thus those files cannot be found giving me the compile error.
comment:3 Changed 11 years ago by
I have resolved the issue. I forced Visual Studio to include the standard math.h
header file.
comment:4 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for the update. I close this ticket, then.
comment:5 Changed 10 years ago by
The attached changeset has been merged to branches 1.3 and default as [6aea07d5ca48]
I cannot reproduce the problem. Could you please specify (even better: attach) the code you actually want to compile?
LEMON certainly does not do anything at all with
acosf()
. I believe it is actually a MSVC specific function.However, I found two missing
std::
namespace specifications in lemon/math.h. But this should not be the reason for your problem. Anyway, the attached patch fixes this issue.