KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.33k stars 648 forks source link

get a templae c++ error in 'vkb::VulkanSample' requires template arguments #1064

Closed mpatalberta closed 3 months ago

mpatalberta commented 5 months ago

In file included from D:/qualcomm_vulkana/tr3/Vulkan-Samples/samples/api/sample_test/sample_test.cpp:18: D:/qualcomm_vulkan/tr3/Vulkan-Samples/samples/api/sample_test/sample_test.h:42:22: error: use of class template 'vkb::VulkanSample' requires template arguments D:/qualcomm_vulkan/tr3/Vulkan-Samples/framework/vulkan_sample.h:127:7: note: template is declared here

mpatalberta commented 5 months ago

my left panel of build

failed Download info The option setting 'android.prefabVersion=2.0.0' is experimental. :app:buildCMakeDebug[arm64-v8a] sample_test.h use of class template 'vkb::VulkanSample' requires template arguments [arm64-v8a] sample_test.cpp com.android.ide.common.process.ProcessException: ninja: Entering directory `D:\qualcomm_vulkan\tr3\Vulkan-Samples\build\android_gradle\app\build-native\Debug\4e840252\arm64-v8a'

SaschaWillems commented 5 months ago

Can you elaborate? Did you create a new sample using the script provided by our repo? If so, that's a known issue, see #1062

mpatalberta commented 5 months ago

No i did the following: PMH786@61L-PMH786 /cygdrive/d/qualcomm_vulkan/tr3/Vulkan-Samples $ ./scripts/generate.py android Generating Android Gradle files at /cygdrive/d/qualcomm_vulkan/tr3/Vulkan-Samples/scripts/../build/android_gradle

mpatalberta commented 5 months ago

Sorry here is what used: $ python scripts/generate.py android Generating Android Gradle files at /cygdrive/d/qualcomm_vulkan/tr3/Vulkan-Samples/scripts/../build/android_gradle

SaschaWillems commented 5 months ago

That's odd. The error comes from a "sample_test" file, which is not part of the repo. Did you maybe at some point in the past try to generate a new sample? Try deleting those files.

mpatalberta commented 5 months ago

I deleted the files and I now get the following

warnings generated. [379/404] Building CXX object samples/performance/swapchain_images/CMakeFiles/swapchain_images.dir/swapchain_images.cpp.o [380/404] Building CXX object samples/performance/texture_compression_basisu/CMakeFiles/texture_compression_basisu.dir/texture_compression_basisu.cpp.o [381/404] Building CXX object samples/performance/surface_rotation/CMakeFiles/surface_rotation.dir/surface_rotation.cpp.o [382/404] Building CXX object samples/performance/wait_idle/CMakeFiles/wait_idle.dir/wait_idle.cpp.o [383/404] Building CXX object samples/performance/texture_compression_comparison/CMakeFiles/texture_compression_comparison.dir/texture_compression_comparison.cpp.o [384/404] Building CXX object samples/tooling/profiles/CMakeFiles/profiles.dir/profiles.cpp.o ninja: build stopped: subcommand failed.

C++ build system [build] failed while executing: @echo off "C:\Users\PMH786\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ -C ^ "D:\qualcomm_vulkan\tr3\Vulkan-Samples\build\android_gradle\app\build-native\Debug\4e840252\arm64-v8a" ^ spirv-cross ^ vulkan_samples from D:\qualcomm_vulkan\tr3\Vulkan-Samples\build\android_gradle\app at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.execute(ExecuteProcess.kt:274) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt$executeProcess$1.invoke(ExecuteProcess.kt:106) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt$executeProcess$1.invoke(ExecuteProcess.kt:104) at com.android.build.gradle.internal.cxx.timing.TimingEnvironmentKt.time(TimingEnvironment.kt:32) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.executeProcess(ExecuteProcess.kt:104) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.executeProcess$default(ExecuteProcess.kt:84) at com.android.build.gradle.internal.cxx.build.CxxRegularBuilder.executeProcessBatch(CxxRegularBuilder.kt:331) at com.android.build.gradle.internal.cxx.build.CxxRegularBuilder.build(CxxRegularBuilder.kt:128) at com.android.build.gradle.tasks.ExternalNativeBuildTask$doTaskAction$$inlined$recordTaskAction$1.invoke(BaseTask.kt:70) at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:51) at com.android.build.gradle.tasks.ExternalNativeBuildTask.doTaskAction(ExternalNativeBuildTask.kt:140) at com.android.build.gradle.internal.tasks.UnsafeOutputsTask$taskAction$$inlined$recordTaskAction$1.invoke(BaseTask.kt:65) at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:51) at com.android.build.gradle.internal.tasks.UnsafeOutputsTask.taskAction(UnsafeOutputsTask.kt:63) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125) ... 112 more Caused by: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\PMH786\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe with arguments {-C D:\qualcomm_vulkan\tr3\Vulkan-Samples\build\android_gradle\app\build-native\Debug\4e840252\arm64-v8a spirv-cross vulkan_samples} at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:73) at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:48) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.execute(ExecuteProcess.kt:269) ... 129 more Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\PMH786\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe'' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:415) at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:46) ... 130 more

From left panel The option setting 'android.prefabVersion=2.0.0' is experimental. :app:buildCMakeDebug[arm64-v8a] vk_funcs.h hpp_oit_linked_lists.cpp oit_linked_lists.cpp pipeline_barriers.cpp subpasses.cpp com.android.ide.common.process.ProcessException: ninja: Entering directory `D:\qualcomm_vulkan\tr3\Vulkan-Samples\build\android_gradle\app\build-native\Debug\4e840252\arm64-v8a'

SaschaWillems commented 4 months ago

Can you post the actual error, or at least format that large blob of errors above in such a way that we can read this? Otherwise it's pretty much impossible to help.

SaschaWillems commented 4 months ago

@mpatalberta : Any update on this? If it's resolved, feel free to close. If not please try to provide more information so we can try to help.

SaschaWillems commented 3 months ago

Closing due to inactivity. If the issue persists, feel free to re-open.