Hi Dominique,
I use VS because Kiwi use it for Windows and if I could keep the same
environment for all the dependencies it would be great.
Furthermore MSYS and MSYS2 installations are broken on the machine that I
use (I'll have to fix this one day...).
But good news! I finally managed to compile for Pd/Windows 64 bits with the
static runtime.
In Debug mode, the external still generate the error
"*HEAP_CORRUPTION_DETECTED:
...*" (but you can skip the errors) and in Release mode it seems to work
perfectly.
I wrote the instructions and the steps on the Readme file of the project
and one can also read the instructions in the file appveyor.yml (for the
Windows CI).
I still have to have find a solution for Windows 32 bits but it's not a
priority.
Cheers,
Pierre
2018-05-30 15:07 GMT+02:00 Dominique Fober <fo...@grame.fr>:
> Sorry for the delay… I’ve been away the 2 last weeks, back for only 1 day
> and really back next week…
> In the meantime, you can try an antidepressant :-)
>
> I’d like to reproduce, maybe with something more easy to debug than Faust~
> (Pd external).
> My experience is that using msys2 environment is more simple and works
> better. In addition, a binary package of llvm exists for pacman.
> Why are you stuck to VS 14 2015?
> —
> Dom
>
>
> Le 24 mai 2018 à 15:25, Pierre Guillot <guillotpier...@gmail.com> a écrit
> :
>
> Hi,
>
> I'm currently working on several integrations of the Faust compiler. The
> first attempt is for Pd (https://github.com/pierreguillot/faust-pd) and
> then, I'll do it for Kiwi (https://github.com/Musicoll/Kiwi). I don't
> have any big problem on Linux and Mac but I can't find any solution on
> Windows with MSVC. I started to explain the problem on this issue (
> https://github.com/grame-cncm/faust/issues/180) but here is a better
> resume. If someone has already compiled and used FaustLib with MSVC and has
> a solution I'll be pleased to know it !
>
> (I use LLVM6.0.0 but I also tried with LLVM5.0.0)
>
> *With dynamic runtime library (CRT /MD or /MDd) for Windows 64bit*
> *1. LLVM:*
> > cmake .. -G "Visual Studio 14 2015 Win64" -DLLVM_BUILD_TESTS=Off
> -DCMAKE_INSTALL_PREFIX="./llvm6.0.0-windows-x64-mdd" -Thost=x64
> > cmake --build . --target ALL_BUILD --config Debug
> > cmake --build . --target INSTALL --config Debug
>
> *2. **FaustLib:*
> > cmake .. -G "Visual Studio 14 2015 Win64" -DINCLUDE_STATIC=on
> -DINCLUDE_OSC=off -DINCLUDE_HTTP=off -DUSE_LLVM_CONFIG=off
> -DLLVM_DIR=./../../llvm6.0.0-windows-x64-mdd/lib/cmake/llvm
> -C..\backends\backends.cmake
>
> > msbuild faust.sln /nologo /p:OutDir=../lib64md/ /p:config=Debug
> /p:plateform=x64 /target:staticlib
>
>
> *3. Faust~ (Pd external):*
> > cmake .. -G "Visual Studio 14 2015 Win64"
> -DLLVM_DIR=./llvm-windows-x64-mtd/lib/cmake/llvm
> -DLIBFAUST_PATH=./../faust/build/lib64
>
> > msbuild faust~.sln /nologo /p:config=Debug /p:plateform=x64
>
>
> *Result: **unresolved symbols* at linking time. And the same thing happens
> when I try to compile for *Windows 32bit*.
>
>
> *With static runtime library (CRT /MT or /MTd) for Windows 64bit*
> *1. LLVM:*
> > cmake .. -G "Visual Studio 14 2015 Win64" -DLLVM_BUILD_TESTS=Off
> -DCMAKE_INSTALL_PREFIX="./llvm6.0.0-windows-x64-mdd" -Thost=x64
> -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT
> > cmake --build . --target ALL_BUILD --config Debug
> > cmake --build . --target INSTALL --config Debug
>
> *2. **FaustLib:*
> > cmake .. -G "Visual Studio 14 2015 Win64" -DINCLUDE_STATIC=on
> -DINCLUDE_OSC=off -DINCLUDE_HTTP=off -DUSE_LLVM_CONFIG=off
> -DLLVM_DIR=./../../llvm6.0.0-windows-x64-mdd/lib/cmake/llvm
> -C..\backends\backends.cmake
> > Change FAUST project to use static CRT with MTd
>
> > msbuild faust.sln /nologo /p:OutDir=../lib64md/ /p:config=Debug
> /p:plateform=x64 /target:staticlib
>
>
> *3. Faust~ (Pd external):*
> > cmake .. -G "Visual Studio 14 2015 Win64"
> -DLLVM_DIR=./llvm-windows-x64-mtd/lib/cmake/llvm
> -DLIBFAUST_PATH=./../faust/build/lib64
> > Change FAUST project to use static CRT with MTd
>
> > msbuild faust~.sln /nologo /p:config=Debug /p:plateform=x64
>
>
> *Result: *It compiles, I can use the external but at the factory creation I
> encounter an error "*HEAP_CORRUPTION_DETECTED: after Normal block (#29784) at
> 0x000... CRT detected that the application wrote to memory after end of heap
> buffer.*" If I continue (*createCDSPFactoryFromFile()* and
> *createCDSPInstance()* seem to work) I can use the object (I can use the glue
> interface and retrieve the number of inputs and outputs) until I turn on the
> DSP and the call of the function *computeCDSPInstance() *crashes.
>
>
> *With static runtime library (CRT /MT or /MTd) for Windows 32bit*
> *1. LLVM:*
> > cmake .. -G "Visual Studio 14 2015" -DLLVM_BUILD_TESTS=Off
> -DCMAKE_INSTALL_PREFIX="./llvm6.0.0-windows-win32-mdd" -Thost=x64
> -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT
> > cmake --build . --target ALL_BUILD --config Debug
> > cmake --build . --target INSTALL --config Debug
>
> *2. **FaustLib:*
> > cmake .. -G "Visual Studio 14 2015" -DINCLUDE_STATIC=on -DINCLUDE_OSC=off
> -DINCLUDE_HTTP=off -DUSE_LLVM_CONFIG=off
> -DLLVM_DIR=./../../llvm6.0.0-windows-win32-mdd/lib/cmake/llvm
> -C..\backends\backends.cmake
> > Change FAUST project to use static CRT with MTd
>
> > msbuild faust.sln /nologo /p:OutDir=../lib32md/ /p:config=Debug
> /p:plateform=Win32 /target:staticlib
>
>
> *3. Faust~ (Pd external):*
> > cmake .. -G "Visual Studio 14 2015"
> -DLLVM_DIR=./llvm-windows-x86-mtd/lib/cmake/llvm
> -DLIBFAUST_PATH=./../faust/build/lib32
> > Change FAUST project to use static CRT with MTd
>
> > msbuild faust~.sln /nologo /p:config=Debug /p:plateform=Win32
>
>
> It compile but when I try to use the external I encounter the same error
> "*HEAP_CORRUPTION_DETECTED: after Normal block (#29784) at 0x000... CRT
> detected that the application wrote to memory after end of heap buffer.*" And
> if I continue I got *Program used external function '_free' which could not
> be resolved!* when I try to create the factory with
> *createCDSPFactoryFromFile()*.
>
>
> You can also have a look at the file appveyor.yml
> (https://github.com/pierreguillot/faust-pd/blob/master/appveyor.yml).
>
>
> This problem drives me crazy... now I going to try magical incantations... so
> any help would be much appreciated (and I would like to avoid MSYS).
>
> Cheers,
>
>
> Pierre
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot______
> _________________________________________
> Faudiostream-devel mailing list
> Faudiostream-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-devel
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel