Skip to content

Conversation

@meiyasan
Copy link

@meiyasan meiyasan commented May 20, 2022

Hello,

I have been facing some issues installing KFR on a basic Ubuntu distribution.
My setup is using a scientific framework (ROOT CERN) which is compiled with Clang10, and some other parts with GCC9.

I had to update many namespace to avoid ambiguities between cometa:: and std:: methods.
Here is a working update, that I compile using :
mkdir build && cd build cmake -DENABLE_TESTS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_COMPILER=clang++ -DENABLE_CAPI_BUILD=ON ../

Can somebody have a look at that ?

@meiyasan
Copy link
Author

#151

@meiyasan
Copy link
Author

Anybody here ? @dlevin256 ?

@meiyasan
Copy link
Author

I just provided an additional modification. I was using only "kfr/dft.h" header in my program and not "kfr/all.hpp", so some ambiguities were remaining.

@dancasarin
Copy link
Member

Hello,

Do you run the code in Cling interpreter?
It adds using namespace std implicitly before user even gets chance
to include any external header.
This is against c++ namespace concept and causes all these errors.

The following (bad practice) code produces the same error:

// first merge the whole std namespace into current scope
using namespace std; // Cling does this

// then including kfr headers
#include <kfr/all.hpp>

@meiyasan
Copy link
Author

Right that is what I am using. However, it would not be a bad thing to avoid ambiguities between namespaces I suppose.

@ferdymercury
Copy link

(Side note: this 'using std' might change in the future, see root-project/root#11027)

@meiyasan meiyasan closed this May 23, 2023
@meiyasan
Copy link
Author

meiyasan commented May 23, 2023

I just tested kfr 5.0. This is now working fine !

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

Successfully merging this pull request may close these issues.

3 participants