open-discussion > compile MRIcroGL for Windows, using lazarus. failing with metal-demos
Showing 1-2 of 2 posts
Apr 24, 2020 03:04 PM | sujan dasmahapatra
compile MRIcroGL for Windows, using lazarus. failing with metal-demos
hi
I am starting a new thread on this, as the last thread went too long. I am trying to build the latest MRIcroGL version 1.20200331 from github. But it is failing.
1. Initially it threw this error as SimdUtil unit is not there. so I again downloaded the i2nii package and in this I found SimdUtil.pas unit which I copied and placed in the main package of MRIcroGL.
2. Then it threw a number of other errors, I came to know this all for metal-demos. So I downloaded the metal demos from git hub. from this link "https://github.com/genericptr/Metal-Framework". and I tried to install metal. but while compiling metal it gave me a number of errors of objectivec and macos. then I came know this is all for MacOS.
So I want to know is metal demos designed for apple macos? then how can I build it for Windows with lazarus. I am using lazarus 2.06 the latest.
I need the remedy where can I get the right metal-framework, ? Please give me the link. And guidance to build in Windows, using lazarus.
Any help would be highly appreciated.
Thanks a lot in advance.
I am starting a new thread on this, as the last thread went too long. I am trying to build the latest MRIcroGL version 1.20200331 from github. But it is failing.
1. Initially it threw this error as SimdUtil unit is not there. so I again downloaded the i2nii package and in this I found SimdUtil.pas unit which I copied and placed in the main package of MRIcroGL.
2. Then it threw a number of other errors, I came to know this all for metal-demos. So I downloaded the metal demos from git hub. from this link "https://github.com/genericptr/Metal-Framework". and I tried to install metal. but while compiling metal it gave me a number of errors of objectivec and macos. then I came know this is all for MacOS.
So I want to know is metal demos designed for apple macos? then how can I build it for Windows with lazarus. I am using lazarus 2.06 the latest.
I need the remedy where can I get the right metal-framework, ? Please give me the link. And guidance to build in Windows, using lazarus.
Any help would be highly appreciated.
Thanks a lot in advance.
Apr 24, 2020 05:04 PM | Chris Rorden
RE: compile MRIcroGL for Windows, using lazarus. failing with metal-demos
Hello, I can not replicate your issues. You will need to provide
more details. I downloaded a fresh copy of Lazarus (2.0.8) for
Windows. I made sure the executable 'lazbuild' was in path
environment variable (so it can be run from the command line). Then
I followed the instructions at
https://github.com/rordenlab/MRIcroGL12
specifically:
git clone https://github.com/rordenlab/MRIcroGL12....
git clone https://github.com/neurolabusc/Metal-Dem...
git clone https://github.com/Alexey-T/Python-for-L...
lazbuild --build-ide= --add-package lazopenglcontext ./Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk
cd MRIcroGL12
lazbuild -B MRIcroGL.lpr
This compiled a copy of MRIcroGL that executed fine.
1. The fact that the project did not find SimdUtil suggests you did not install Metal-Demos, or did not download it to the expected location (e.g. if you are compiling ./MRIcroGL.lpi, you will want the relative location of this file to be ../Metal-Demos/common/Simd-Utils.pas
2. On MacOS MRIcroGL and the Metal-Demo projects can be compiled to either the OpenGL or Metal API. For Windows and Linux, you can only compile to the OpenGL API. For MRIcroGL, OpenGL is the default API. For the Metal-Demos, projects that use OpenGL use the name *_gl.lpi. So if you consider the volume rendering demo
https://github.com/neurolabusc/Metal-Demos/tree/master/volumerender
the project vrProj_gl.lpi uses OpenGL and can be compiled on Windows, MacOS and Linux. The corresponding project vrProj.lpi uses Metal and requires MacOS.
https://github.com/rordenlab/MRIcroGL12
specifically:
git clone https://github.com/rordenlab/MRIcroGL12....
git clone https://github.com/neurolabusc/Metal-Dem...
git clone https://github.com/Alexey-T/Python-for-L...
lazbuild --build-ide= --add-package lazopenglcontext ./Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk
cd MRIcroGL12
lazbuild -B MRIcroGL.lpr
This compiled a copy of MRIcroGL that executed fine.
1. The fact that the project did not find SimdUtil suggests you did not install Metal-Demos, or did not download it to the expected location (e.g. if you are compiling ./MRIcroGL.lpi, you will want the relative location of this file to be ../Metal-Demos/common/Simd-Utils.pas
2. On MacOS MRIcroGL and the Metal-Demo projects can be compiled to either the OpenGL or Metal API. For Windows and Linux, you can only compile to the OpenGL API. For MRIcroGL, OpenGL is the default API. For the Metal-Demos, projects that use OpenGL use the name *_gl.lpi. So if you consider the volume rendering demo
https://github.com/neurolabusc/Metal-Demos/tree/master/volumerender
the project vrProj_gl.lpi uses OpenGL and can be compiled on Windows, MacOS and Linux. The corresponding project vrProj.lpi uses Metal and requires MacOS.