#How do I add Vulkan with GCC, MinGW and o64-clang?
55 messages · Page 1 of 1 (latest)
Know the specification you have downloaded. If on Windows (which I assume you are), you will find that in C:\VulkanSDK\your spec version. If you have not yet downloaded the SDK, head to https://www.lunarg.com/vulkan-sdk/ and follow the setup process. You will want to specify your include flag to be the path to the \Include folder within the SDK (e.g. -I"C:\VulkanSDK\1.4.304\Include") and your linker flag to be the same, but for the \Lib folder instead (e.g. -I"C:\VulkanSDK\1.4.304\Lib"). There may also be an environment variable such as VULKAN_SDK or VK_SDK_PATH which will automatically fill out "C:\VulkanSDK\spec" for you. You then simply need to include Vulkan through "#include <vulkan/vulkan.h>".
my vulkan downloaded on /home/comical/vulkan
are you using windows?
no, I am a Linux user
can't help ya then since I don't use Linux, sorry
if you're using Linux then how are you using MinGW?
probably mingw cross compiler - to build windows programs from a linux environment
I was compiling with Clang and mingw headers, I was on windows but I doubt that changes anything, what is the exact error you’re running into?
Have you used a build system such as make or CMake before?
Vulkan-tutorial talks about setting up a makefile project on Linux https://vulkan-tutorial.com/en/Development_environment#page_Setting-up-a-makefile-project
mingw is made by open source comunity, is from gcc. so i can just use it since is gcc and it works well
not needed, you can just use cmake
mingw will also build for windows by default, gcc will build for linux if running in linux
yes
but on linux we install mingw running
sudo apt install mingw
for debian distributions
that is fine, but no lib will have a mingw package, you have to compile everything yourself
No you don't
what library has a mingw package?
you can use msvc ones
Like ones of boost
can be used to build an app for windows with mingw
*only dynamic libs
i've tested
and static ones too
not always
that's why there's clang
so you have not yet stated what is the problem you are having other than "how"
I fixed it already e, it was just vulkan sdk setup thinky
I've been doing mingw headers for a long time but bunding crt is a bit annoying if you don't want to link it statically because nobody in the universe has mingw installed.
But I've been avoiding it all together by only using winapi with mingw headers
this way you don't need crt
that is just not true
src? cuz last I checked it didn't play nice with static libs
idk just build with clang --target=x86_64-pc-windows-gnu -static
and you will have crt in your file
that's clang not gcc
yes its the same
clang comes without headers
you can do it with gcc
same result
and we're talking about linking msvc built static libs here not static libs in general