Horde3D
http://horde3d.org/forums/

"Unix Makefiles" and mingw64 problem
http://horde3d.org/forums/viewtopic.php?f=2&t=2326
Page 1 of 1

Author:  gwald [ 19.04.2022, 10:40 ]
Post subject:  "Unix Makefiles" and mingw64 problem

Hi again,
I've tried compiling with mingw64 in both windows and linux (sudo apt-get install mingw-w64) using the downloaded SDL2 and GLFW... github master and 2.0.1
and they all compile horde3d libs but fails in the same place:
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw
32/bin/ld.exe: ../../../Horde3D/Samples/Framework/libSampleFramework.a(GLFWFrame
work.cpp.obj):GLFWFramework.cpp:(.text+0xac2): undefined reference to `__imp_h3d
utLoadResourcesFromDisk'



I'm cmake noob, but it looks like should just work, the horde3dutils main.cpp compiles fine.

Looks like it should find the function
Horde3D-2.0.1/bin/Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/linklibs.rsp:
../../../Horde3D/Source/Horde3DUtils/libHorde3DUtils.dll.a ../../../Horde3D/Samples/Framework/libSampleFramework.a -lmingw32 "../../../project_glfw-prefix/lib/libglfw3.a" ../../../Horde3D/Source/Horde3DEngine/libHorde3D.dll.a -lopengl32 ../../Overlays/Source/libHorde3DOverlays.a ../Source/libHorde3DTerrain.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32


Anyone else use mingw? or any tips as to where to look?
:mrgreen:

Code:
C:\Horde3D-2.0.1\bin>cmake -G "Unix Makefiles" ..
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/mingw64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for strncpy_s
-- Looking for strncpy_s - found
-- Preparing external GLFW project
-- External GLFW project done
-- Found GLFW: TRUE
-- Found OpenGL: opengl32
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Horde3D-2.0.1/bin

C:\Horde3D-2.0.1\bin>make

C:\Horde3D-2.0.1\bin>make
[  1%] Creating directories for 'project_glfw'
[  2%] Performing download step (download, verify and extract) for 'project_glfw
'
-- project_glfw download command succeeded.  See also C:/Horde3D-2.0.1/bin/proje
ct_glfw-prefix/src/project_glfw-stamp/project_glfw-download-*.log
[  4%] No update step for 'project_glfw'
[  5%] No patch step for 'project_glfw'
[  7%] Performing configure step for 'project_glfw'
-- project_glfw configure command succeeded.  See also C:/Horde3D-2.0.1/bin/proj
ect_glfw-prefix/src/project_glfw-stamp/project_glfw-configure-*.log
[  8%] Performing build step for 'project_glfw'
-- project_glfw build command succeeded.  See also C:/Horde3D-2.0.1/bin/project_
glfw-prefix/src/project_glfw-stamp/project_glfw-build-*.log
[ 10%] Performing install step for 'project_glfw'
-- project_glfw install command succeeded.  See also C:/Horde3D-2.0.1/bin/projec
t_glfw-prefix/src/project_glfw-stamp/project_glfw-install-*.log
[ 11%] Completed 'project_glfw'
[ 11%] Built target project_glfw
[ 13%] Building CXX object Extensions/Overlays/Source/CMakeFiles/Horde3DOverlays
.dir/extension.cpp.obj
[ 14%] Building CXX object Extensions/Overlays/Source/CMakeFiles/Horde3DOverlays
.dir/overlays.cpp.obj
[ 15%] Linking CXX static library libHorde3DOverlays.a
[ 15%] Built target Horde3DOverlays
[ 17%] Building CXX object Extensions/Terrain/Source/CMakeFiles/Horde3DTerrain.d
ir/extension.cpp.obj
[ 18%] Building CXX object Extensions/Terrain/Source/CMakeFiles/Horde3DTerrain.d
ir/terrain.cpp.obj
[ 20%] Linking CXX static library libHorde3DTerrain.a
[ 20%] Built target Horde3DTerrain
[ 21%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gAnimatables.cpp.obj
[ 23%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gAnimation.cpp.obj
[ 24%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gCamera.cpp.obj
[ 26%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gCom.cpp.obj
[ 27%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gComputeNode.cpp.obj
[ 28%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gComputeBuffer.cpp.obj
[ 30%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gExtensions.cpp.obj
[ 31%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gGeometry.cpp.obj
[ 33%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gLight.cpp.obj
[ 34%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gMain.cpp.obj
[ 36%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gMaterial.cpp.obj
[ 37%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gModel.cpp.obj
[ 39%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gModules.cpp.obj
[ 40%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gParticle.cpp.obj
[ 42%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gPipeline.cpp.obj
[ 43%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gPrimitives.cpp.obj
[ 44%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gRenderer.cpp.obj
[ 46%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gResource.cpp.obj
[ 47%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gScene.cpp.obj
[ 49%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gSceneGraphRes.cpp.obj
[ 50%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gShader.cpp.obj
[ 52%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gTexture.cpp.obj
[ 53%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/u
tImage.cpp.obj
[ 55%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gRendererBaseGL2.cpp.obj
[ 56%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/e
gRendererBaseGL4.cpp.obj
[ 57%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/u
tOpenGL.cpp.obj
[ 59%] Linking CXX shared library ../../../Binaries/Windows/Release/libHorde3D.d
ll
[ 59%] Built target Horde3D
[ 60%] Building CXX object Horde3D/Source/Horde3DUtils/CMakeFiles/Horde3DUtils.d
ir/main.cpp.obj
[ 62%] Linking CXX shared library ../../../Binaries/Windows/Release/libHorde3DUt
ils.dll
[ 62%] Built target Horde3DUtils
[ 63%] Building CXX object Horde3D/Samples/Framework/CMakeFiles/SampleFramework.
dir/sampleapp.cpp.obj
[ 65%] Building CXX object Horde3D/Samples/Framework/CMakeFiles/SampleFramework.
dir/GLFWFramework.cpp.obj
[ 66%] Linking CXX static library libSampleFramework.a
[ 66%] Built target SampleFramework
[ 68%] Built target GLFW_LIBRARY_EXTERN
[ 69%] Building CXX object Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/app.
cpp.obj
[ 71%] Building CXX object Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/main
.cpp.obj
[ 72%] Linking CXX executable ../../../Binaries/Windows/Release/Terrain.exe
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw
32/bin/ld.exe: ../../../Horde3D/Samples/Framework/libSampleFramework.a(GLFWFrame
work.cpp.obj):GLFWFramework.cpp:(.text+0xac2): undefined reference to `__imp_h3d
utLoadResourcesFromDisk'
collect2.exe: error: ld returned 1 exit status
Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/build.make:121: recipe for targ
et 'Binaries/Windows/Release/Terrain.exe' failed
make[2]: *** [Binaries/Windows/Release/Terrain.exe] Error 1
CMakeFiles/Makefile2:600: recipe for target 'Extensions/Terrain/Sample/CMakeFile
s/Terrain.dir/all' failed
make[1]: *** [Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/all] Error 2
makefile:90: recipe for target 'all' failed
make: *** [all] Error 2


Author:  Irdis [ 21.04.2022, 09:44 ]
Post subject:  Re: "Unix Makefiles" and mingw64 problem

Hello. I've never tried compiling Horde with mingw, but I'll look into the problem. Please try the latest master branch, maybe the fix for glfw will also help your problem.

P.S. You should probably create new issues in the github tracker, I'll be able to answer faster than on the forum (https://github.com/horde3d/Horde3D). Thanks.

Author:  gwald [ 21.04.2022, 13:11 ]
Post subject:  Re: "Unix Makefiles" and mingw64 problem

Irdis wrote:
Hello. I've never tried compiling Horde with mingw, but I'll look into the problem. Please try the latest master branch, maybe the fix for glfw will also help your problem.

P.S. You should probably create new issues in the github tracker, I'll be able to answer faster than on the forum (https://github.com/horde3d/Horde3D). Thanks.


Hi thanks for the reply :)
The windows log from my previous post was 2.0.1 but I also test with 2 and a new master copy, it's the same results.


This makes me think it's a cmake setting/issue... I don't think it's a #define problem, but a linking (ordering?) problem.

I was thinking of posting on github but thought I'd give some love here! :)

I will raise it there also and future support posts.



BTW, Here is the logs for the SDL download and build (in linux using mingw), it's the same error as the GLFW one.
SDLFramework.cpp:(.text+0x1682): undefined reference to `__imp_h3dutLoadResourcesFromDisk'


https://github.com/horde3d/Horde3D/issues/206

Code:
dev@mx:~/Horde3D/build.win
$ make clean
dev@mx:~/Horde3D/build.win
$ make
[  1%] Creating directories for 'project_sdl'
[  2%] Performing download step (download, verify and extract) for 'project_sdl'
-- project_sdl download command succeeded.  See also /home/dev/Horde3D/build.win/project_sdl-prefix/src/project_sdl-stamp/project_sdl-download-*.log
[  4%] No update step for 'project_sdl'
[  5%] No patch step for 'project_sdl'
[  7%] Performing configure step for 'project_sdl'
-- project_sdl configure command succeeded.  See also /home/dev/Horde3D/build.win/project_sdl-prefix/src/project_sdl-stamp/project_sdl-configure-*.log
[  8%] Performing build step for 'project_sdl'
-- project_sdl build command succeeded.  See also /home/dev/Horde3D/build.win/project_sdl-prefix/src/project_sdl-stamp/project_sdl-build-*.log
[ 10%] Performing install step for 'project_sdl'
-- project_sdl install command succeeded.  See also /home/dev/Horde3D/build.win/project_sdl-prefix/src/project_sdl-stamp/project_sdl-install-*.log
[ 11%] Completed 'project_sdl'
[ 11%] Built target project_sdl
[ 13%] Building CXX object Extensions/Overlays/Source/CMakeFiles/Horde3DOverlays.dir/extension.cpp.obj
[ 14%] Building CXX object Extensions/Overlays/Source/CMakeFiles/Horde3DOverlays.dir/overlays.cpp.obj
[ 16%] Linking CXX static library libHorde3DOverlays.a
[ 16%] Built target Horde3DOverlays
[ 17%] Building CXX object Extensions/Terrain/Source/CMakeFiles/Horde3DTerrain.dir/extension.cpp.obj
[ 19%] Building CXX object Extensions/Terrain/Source/CMakeFiles/Horde3DTerrain.dir/terrain.cpp.obj
[ 20%] Linking CXX static library libHorde3DTerrain.a
[ 20%] Built target Horde3DTerrain
[ 22%] Building CXX object Horde3D/Samples/Framework/CMakeFiles/SampleFramework.dir/sampleapp.cpp.obj
[ 23%] Building CXX object Horde3D/Samples/Framework/CMakeFiles/SampleFramework.dir/SDLFramework.cpp.obj
[ 25%] Linking CXX static library libSampleFramework.a
[ 25%] Built target SampleFramework
[ 26%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egAnimatables.cpp.obj
[ 27%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egAnimation.cpp.obj
[ 29%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egCamera.cpp.obj
[ 30%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egCom.cpp.obj
[ 32%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egComputeNode.cpp.obj
[ 33%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egComputeBuffer.cpp.obj
[ 35%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egExtensions.cpp.obj
[ 36%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egGeometry.cpp.obj
[ 38%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egLight.cpp.obj
[ 39%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egMain.cpp.obj
[ 41%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egMaterial.cpp.obj
[ 42%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egModel.cpp.obj
[ 44%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egModules.cpp.obj
[ 45%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egParticle.cpp.obj
[ 47%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egPipeline.cpp.obj
[ 48%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egPrimitives.cpp.obj
[ 50%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egRenderer.cpp.obj
[ 51%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egResource.cpp.obj
[ 52%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egScene.cpp.obj
[ 54%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egSceneGraphRes.cpp.obj
[ 55%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egShader.cpp.obj
[ 57%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egTexture.cpp.obj
[ 58%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/utImage.cpp.obj
[ 60%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egRendererBaseGL2.cpp.obj
[ 61%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egRendererBaseGL4.cpp.obj
[ 63%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/utOpenGL.cpp.obj
[ 64%] Linking CXX shared library ../../../Binaries/Windows/Release/libHorde3D.dll
[ 64%] Built target Horde3D
[ 66%] Building CXX object Horde3D/Source/Horde3DUtils/CMakeFiles/Horde3DUtils.dir/main.cpp.obj
[ 67%] Linking CXX shared library ../../../Binaries/Windows/Release/libHorde3DUtils.dll
[ 67%] Built target Horde3DUtils
[ 69%] Building CXX object Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/app.cpp.obj
[ 70%] Building CXX object Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/main.cpp.obj
[ 72%] Linking CXX executable ../../../Binaries/Windows/Release/Terrain.exe
/usr/bin/x86_64-w64-mingw32-ld: ../../../Horde3D/Samples/Framework/libSampleFramework.a(SDLFramework.cpp.obj):SDLFramework.cpp:(.text+0x1682): undefined reference to `__imp_h3dutLoadResourcesFromDisk'
collect2: error: ld returned 1 exit status
make[2]: *** [Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/build.make:128: Binaries/Windows/Release/Terrain.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:659: Extensions/Terrain/Sample/CMakeFiles/Terrain.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
dev@mx:~/Horde3D/build.win

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/