jamoma / JamomaCore

Jamoma Frameworks for Audio and Control Structure
Other
36 stars 14 forks source link

mingw build #367

Closed avilleret closed 9 years ago

avilleret commented 9 years ago

when trying to cross build JamomaCore on Ubuntu 15.04 with i686-w64-mingw32-g++-posix (version 4.9.2) I got the following :

[  0%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTFoundation.cpp.obj
[  0%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTCallback.cpp.obj
[  1%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTClass.cpp.obj
[  1%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTEnvironment.cpp.obj
[  1%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTMutex.cpp.obj
[  1%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTQueue.cpp.obj
[  2%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTThread.cpp.obj
[  2%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTUnitTest.cpp.obj
[  2%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTAttribute.cpp.obj
[  2%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTDataObjectBase.cpp.obj
[  2%] Building CXX object Foundation/library/CMakeFiles/Foundation.dir/source/TTExtensionLoader.cpp.obj
/home/antoine/lib-src/Jamoma/Implementations/PureData/JamomaCore/Foundation/library/source/TTExtensionLoader.cpp:320:20: fatal error: ShlObj.h: Aucun fichier ou dossier de ce type
 #include <ShlObj.h>
                    ^
compilation terminated.
Foundation/library/CMakeFiles/Foundation.dir/build.make:295: recipe for target 'Foundation/library/CMakeFiles/Foundation.dir/source/TTExtensionLoader.cpp.obj' failed
make[2]: *** [Foundation/library/CMakeFiles/Foundation.dir/source/TTExtensionLoader.cpp.obj] Error 1
CMakeFiles/Makefile2:1054: recipe for target 'Foundation/library/CMakeFiles/Foundation.dir/all' failed
make[1]: *** [Foundation/library/CMakeFiles/Foundation.dir/all] Error 2
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2

I just pushed my toolchains here : https://github.com/jamoma/JamomaCore/commit/ad5f66f6c0ce79cbabf48a37b52575ce9f84539e

And configure with :

mkdir build-JamomaCore-mingw
cd build-JamomaCore-mingw
cmake -DCMAKE_TOOLCHAIN_FILE=`readlink -f ../Shared/CMake/toolchains/mingw-64.cmake` -DJAMOMA_CORE_SRC_PATH=`readlink -f ${PWD}/..` ..

What did I forgot ?

jcelerier commented 9 years ago

I think that Linux being case sensitive it might be that the file is named shlobj.h instead of ShlObj.h :

jcelerier@arch-jm ~ % pkgfile --search shlobj.h 
community/mingw-w64-headers

jcelerier@arch-jm ~ % pkgfile --search ShlObj.h
[1]    2055 exit 1     pkgfile --search ShlObj.h
avilleret commented 9 years ago

you're right dude

avilleret commented 9 years ago

but now I have undefined reference to _imp__SHCreateDirectory@8 which seems to be related to shlobj.

avilleret commented 9 years ago

this is related to a bug in Mingw-w64, and it's fixed with version 4.0.2-4 released for Ubuntu 15.10 (yes you may need a Dolorean ;-) )

jcelerier commented 9 years ago

The best kind of bugs!

On Fri, Jun 26, 2015 at 9:40 AM, Antoine Villeret notifications@github.com wrote:

this is related to a bug in Mingw-w64, and it's fixed with version 4.0.2-4 released for Ubuntu 15.10 (yes you may need a Dolorean ;-) )

— Reply to this email directly or view it on GitHub https://github.com/jamoma/JamomaCore/issues/367#issuecomment-115563583.