-
Notifications
You must be signed in to change notification settings - Fork 985
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
[bug] ERROR C1083 and impossible to include SLD2/SDL.h when building on windows #17358
Comments
Thanks for your question. I have tried your first step, and then checked the result:
And inspecting those folders, the This is probably the first thing that you should check. Then the next step would be to check your
The Conan
So knowing your |
Hi ! Thanks for your help, I found those lines :
And there is all the headers files in here. On the CMakeLists.txt side there is the two main files that can be related to the issue :
It works on Linux but not on windows, I don't understand why. |
That I think it might be an issue of paths. If you are using
The |
I applied the changes and it still get the same error :
|
I am afraid I would need something to reproduce. Could you please provide:
Many thanks for the feedback! |
Ok I understand, I reproduced the error using those files : main.cpp
conanfile.txt
CMakeLists.txt
|
There is an error in your CMakeLists.txt. The correct target is: target_link_libraries(Bin
SDL2::SDL2
SDL2_image::SDL2_image
) Please check the output of
After fixing that, this works:
|
Yes my bad but anyway I was not using SDL image, we can remove it from the cmake and conan, I still got the error :( |
Uhm, that is really unexpected. Can you please share the full output of the 2 |
There is the full output of conan + cmake + cmake build :
|
But I still see:
Didn't you remove it? If not, the best would be to put the exact files in a git repo, with a script in the root, to be able to reproduce exactly, to remove potential inconsistencies in the copy&paste. |
I just fixed the cmakelist but anyway without it I still got that :
|
My bad wrong output ahah there is :
|
I am sharing with you a small project: sdl.zip Please download it, extract it in a new folder, and execute inside the folder the |
I works, I got this output :
Thanks you so much, but how ? And how can I do the same in my project ? |
The important thing is to understand what is different in your setup. The best way to report it is to to the same that as I did: produce a full reproducible minimal example. Something fully self-contained but minimal that reproduces the error. With that, we can way more easily help. Without that it is very challenging to know what could be happening. |
Describe the bug
I started to create a Game Engine in Cross platform C++ on WSL2 using Conan as package manager, it works very well on WSL2 but can't compile on windows
There is my conanfile.txt :
And I use these commands to setup and build the project :
Then after the last command there is the error I got :
I would like some help to fix that thanks 👍
How to reproduce it
No response
The text was updated successfully, but these errors were encountered: