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

Errors when try to use in Windows #727

Closed
flaviu22 opened this issue Feb 26, 2024 · 0 comments
Closed

Errors when try to use in Windows #727

flaviu22 opened this issue Feb 26, 2024 · 0 comments

Comments

@flaviu22
Copy link

Win11, x64, compiled with vcpkg, tried to use it on a VS2022 console project (x64).
I have the following code:

#include <iostream>
#include <xlnt/xlnt.hpp>

int main()
{
    std::cout << "Hello World!\n";

	return 0;
}

But I got:

1>------ Build started: Project: TestExcel1, Configuration: Debug x64 ------
1>TestExcel1.cpp
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(38,26): error C2011: 'xlnt::exception': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(38): message : see declaration of 'xlnt::exception'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(73,34): error C2011: 'xlnt::invalid_parameter': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(73): message : see declaration of 'xlnt::invalid_parameter'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(95,36): error C2011: 'xlnt::invalid_sheet_title': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(95): message : see declaration of 'xlnt::invalid_sheet_title'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(117,38): error C2011: 'xlnt::missing_number_format': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(117): message : see declaration of 'xlnt::missing_number_format'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(134,29): error C2011: 'xlnt::invalid_file': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(134): message : see declaration of 'xlnt::invalid_file'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(158,34): error C2011: 'xlnt::illegal_character': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(158): message : see declaration of 'xlnt::illegal_character'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(180,34): error C2011: 'xlnt::invalid_data_type': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(180): message : see declaration of 'xlnt::invalid_data_type'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(202,37): error C2011: 'xlnt::invalid_column_index': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(202): message : see declaration of 'xlnt::invalid_column_index'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(224,39): error C2011: 'xlnt::invalid_cell_reference': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(224): message : see declaration of 'xlnt::invalid_cell_reference'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(251,34): error C2011: 'xlnt::invalid_attribute': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(251): message : see declaration of 'xlnt::invalid_attribute'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(273,30): error C2011: 'xlnt::key_not_found': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(273): message : see declaration of 'xlnt::key_not_found'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(295,38): error C2011: 'xlnt::no_visible_worksheets': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(295): message : see declaration of 'xlnt::no_visible_worksheets'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(317,38): error C2011: 'xlnt::unhandled_switch_case': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(317): message : see declaration of 'xlnt::unhandled_switch_case'
1>C:\Project\vcpkg\installed\x64-windows\include\xlnt\utils\exceptions.hpp(339,28): error C2011: 'xlnt::unsupported': 'class' type redefinition
1>C:\Project\TestExcel1\xlnt\utils\exceptions.hpp(339): message : see declaration of 'xlnt::unsupported'
1>Done building project "TestExcel1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Why? I noticed all those clases are inside xlnt namespace, but still there is a conflict, why?

image

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

1 participant