Skip to content
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

Install error with cost_curve.h #24

Open
enlochner opened this issue Jun 22, 2023 · 1 comment
Open

Install error with cost_curve.h #24

enlochner opened this issue Jun 22, 2023 · 1 comment

Comments

@enlochner
Copy link
Collaborator

When trying to build the gcamwrapper package, I get an error
error C2589: '(': illegal token on right side of '::' in the file util/curves/include/cost_curve.h

After some googling, I found that what's probably happening is that "max" has been made a macro which happens at some point within windows.h. I think there are a few different solutions to this. I just added #undef max (and #undef min) to the top of the file, which seemed to fix it. Not sure if this is the best solution.

@daleihao
Copy link

@enlochner Thanks for these useful debug info. Did you encounter this issue when building gcamwrapper-python in Windows using visual studio 2023?

Creating library build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.lib and object build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.exp
      get_data_helper.obj : error LNK2001: unresolved external symbol "private: static class tbb::detail::d1::enumerable_thread_specific<double *,class tbb::detail::d1::cache_aligned_allocator<double *>,0> Value::sCentralValue" (?sCentralValue@Value@@0V?$enumerable_thread_specific@PEANV?$cache_aligned_allocator@PEAN@d1@detail@tbb@@$0A@@d1@detail@tbb@@A)
      build\lib.win-amd64-cpython-311\gcam_module.cp311-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants