Skip to content

Commit 3105532

Browse files
committed
Fix compilation error in tutorials for linux
:Release Notes: GLTF library contains implicit dependency from openmp. Latest gcc version doesn't include openmp by default, so it is requried to bypass -fopenmp flag to linkage :Detailed Notes: Fix error: RadeonProRender/binUbuntu18/libProRenderGLTF.so: undefined reference to `omp_get_thread_num' RadeonProRender/binUbuntu18/libProRenderGLTF.so: undefined reference to `omp_get_num_threads' RadeonProRender/binUbuntu18/libProRenderGLTF.so: undefined reference to `omp_get_thread_num' RadeonProRender/binUbuntu18/libProRenderGLTF.so: undefined reference to `omp_get_num_threads' RadeonProRender/binUbuntu18/libProRenderGLTF.so: undefined reference to `GOMP_parallel' RadeonProRender/binUbuntu18/libProRenderGLTF.so: undefined reference to `GOMP_parallel' :Testing Performed: Compilation and run at gentoo linux :QA Notes: :Issues Addressed: Signed-off-by: Maksym Sditanov <msditanov@200volts.com>
1 parent 93d657e commit 3105532

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

tutorials/60_mesh_export/premake4.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ project "60_mesh_export"
1212

1313
buildoptions "-std=c++11"
1414

15-
configuration {"x64"}
16-
links {"RadeonProRender64", "RprLoadStore64", "ProRenderGLTF"}
17-
15+
configuration {"x64"}
16+
links {"RadeonProRender64", "RprLoadStore64", "ProRenderGLTF"}
17+
18+
if os.istarget("linux") then
19+
linkoptions "-fopenmp"
20+
end
21+
1822
configuration {"x64", "Debug"}
1923
targetdir "../Bin"
2024
configuration {"x64", "Release"}

tutorials/61_mesh_import/premake4.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ project "61_mesh_import"
1212

1313
buildoptions "-std=c++11"
1414

15-
configuration {"x64"}
16-
links {"RadeonProRender64", "RprLoadStore64", "ProRenderGLTF"}
17-
15+
configuration {"x64"}
16+
links {"RadeonProRender64", "RprLoadStore64", "ProRenderGLTF"}
17+
18+
if os.istarget("linux") then
19+
linkoptions "-fopenmp"
20+
end
21+
1822
configuration {"x64", "Debug"}
1923
targetdir "../Bin"
2024
configuration {"x64", "Release"}

0 commit comments

Comments
 (0)