cyrillef / FBX-glTF

FBX glTF importer/exporter plug-in and converter.
MIT License
210 stars 50 forks source link

Unable to compile on OS X 10.10.5 #2

Closed tizzle closed 8 years ago

tizzle commented 8 years ago

Hey,

i'm not really sure if you can help me out on this, but i'm having trouble getting the converter to work. Unfortunately my knowledge on building applications via command line is rather limited, as i am a graphic designer.

Here's what i did so far, following your instructions:

  1. Downloaded and installed the MAC version of the FBX SDK from Autodesk (http://usa.autodesk.com/adsk/servlet/pc/item?id=24746731&siteID=123112)
  2. Downloaded and installed Casablanca. This was rather complicated, as the master branch would not compile on OS X 10.10, the dev branch did, with minor tweaks. If this is a possible source of the following problems, i can provide detailed instructions on how i managed to install casablanca.
  3. Cloned the FBX-glTF repository (https://github.com/cyrillef/FBX-glTF). created a new folder named build.release inside FBX-glTF-master.
  4. Followed your optional 6th step, copying CMakeConfigExample.txt to my new folder and renaming it to CMakeCache.txt, and editing it to point to the FBX SDK installation.
  5. Opened my build.release folder in Terminal and ran cmake .. I'm getting the following output:
-- The C compiler identification is AppleClang 6.0.0.6000038
-- The CXX compiler identification is AppleClang 6.0.0.6000038
-- Check for working C compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using Casablanca: 
-- Using FBX: /Applications/Autodesk/FBX SDK/2016.1.2
-- Ouput Directory: /Users/tillhinrichs/Documents/_DEVELOPER/glTF/FBX-glTF-master/build.release/Release
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   random
--   chrono
--   system
--   thread
--   locale
--   regex
--   filesystem
-- Setting clang options
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/tillhinrichs/Documents/_DEVELOPER/glTF/FBX-glTF-master/build.release

Looks like everything went ok. The build.release folder now contains lots of subfolders:

But now i'm lost. I see there are folder for glTF and IO-glTF, bit no compiled binaries in the Realease folder so far. Within the glTF and IO-glTF folders i find a Makefile and cmake_install.cmake. What do i have to do?

If i run a simple make within the build.release folder, i get an error.

Scanning dependencies of target IO-glTF
[  4%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/dllmain.cpp.o
[  8%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/glslShader.cpp.o
[ 13%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfReader.cpp.o
[ 17%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Asset.cpp.o
[ 21%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Buffer.cpp.o
[ 26%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Camera.cpp.o
[ 30%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Light.cpp.o
[ 34%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Material.cpp.o
[ 39%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Mesh.cpp.o
[ 43%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Null.cpp.o
[ 47%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Program.cpp.o
[ 52%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Scene.cpp.o
[ 56%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Technique.cpp.o
[ 60%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Texture.cpp.o
[ 65%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter.cpp.o
[ 69%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/IOglTF.cpp.o
[ 73%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/StdAfx.cpp.o
[ 78%] Linking CXX shared library ../Release/libIO-glTF.dylib
ld: library not found for -lcpprest.2.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Release/libIO-glTF.dylib] Error 1
make[1]: *** [IO-glTF/CMakeFiles/IO-glTF.dir/all] Error 2
make: *** [all] Error 2

Can you make any sense of this? I am out of ideas. Thanks in advance!

vijayaprakash commented 8 years ago

Hi Till,

Sorry for the delayed response.

I believe, in your MacOS cpprest2.6 could have been installed by default while you follow the installation steps. So, in your Makefile please change to 2.6 instead of 2.4 -lcpprest.2.4 --> -lcpprest.2.6

Hope that helps.

Thanks, Vijaya Prakash.

From: Till Hinrichs [mailto:notifications@github.com] Sent: 25 January 2016 PM 03:59 To: cyrillef/FBX-glTF Subject: [FBX-glTF] Unable to compile on OS X 10.10.5 (#2)

Hey,

i'm not really sure if you can help me out on this, but i'm having trouble getting the converter to work. Unfortunately my knowledge on building applications via command line is rather limited, as i am a graphic designer.

Here's what i did so far, following your instructions:

  1. Downloaded and installed the MAC version of the FBX SDK from Autodesk (http://usa.autodesk.com/adsk/servlet/pc/item?id=24746731&siteID=123112)
  2. Downloaded and installed Casablanca. This was rather complicated, as the master branch would not compile on OS X 10.10, the dev branch did, with minor tweaks. If this is a possible source of the following problems, i can provide detailed instructions on how i managed to install casablanca.
  3. Cloned the FBX-glTF repository (https://github.com/cyrillef/FBX-glTF). created a new folder named build.release inside FBX-glTF-master.
  4. Followed your optional 6th step, copying CMakeConfigExample.txt to my new folder and renaming it to CMakeCache.txt, and editing it to point to the FBX SDK installation.
  5. Opened my build.release folder in Terminal and ran cmake ..

    I'm getting the following output:

-- The C compiler identification is AppleClang 6.0.0.6000038

-- The CXX compiler identification is AppleClang 6.0.0.6000038

-- Check for working C compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc

-- Check for working C compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

-- Check for working CXX compiler: /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Using Casablanca:

-- Using FBX: /Applications/Autodesk/FBX SDK/2016.1.2

-- Ouput Directory: /Users/tillhinrichs/Documents/_DEVELOPER/glTF/FBX-glTF-master/build.release/Release

-- Boost version: 1.60.0

-- Found the following Boost libraries:

-- random

-- chrono

-- system

-- thread

-- locale

-- regex

-- filesystem

-- Setting clang options

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/tillhinrichs/Documents/_DEVELOPER/glTF/FBX-glTF-master/build.release

Looks like everything went ok. The build.release folder now contains lots of subfolders: [https://camo.githubusercontent.com/1c4f11485ac32aaa192f408885374fe041f883b9/687474703a2f2f7777772e74696c6c68696e72696368732e64652f66696c65732f6469726563746f72795f7374727563747572652e706e67]https://camo.githubusercontent.com/1c4f11485ac32aaa192f408885374fe041f883b9/687474703a2f2f7777772e74696c6c68696e72696368732e64652f66696c65732f6469726563746f72795f7374727563747572652e706e67

But now i'm lost. I see there are folder for glTF and IO-glTF, bit no compiled binaries in the Realease folder so far. Within the glTF and IO-glTF folders i find a Makefile and cmake_install.cmake. What do i have to do?

If i run a simple make within the build.release folder, i get an error.

Scanning dependencies of target IO-glTF

[ 4%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/dllmain.cpp.o

[ 8%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/glslShader.cpp.o

[ 13%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfReader.cpp.o

[ 17%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Asset.cpp.o

[ 21%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Buffer.cpp.o

[ 26%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Camera.cpp.o

[ 30%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Light.cpp.o

[ 34%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Material.cpp.o

[ 39%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Mesh.cpp.o

[ 43%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Null.cpp.o

[ 47%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Program.cpp.o

[ 52%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Scene.cpp.o

[ 56%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Technique.cpp.o

[ 60%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter-Texture.cpp.o

[ 65%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/gltfWriter.cpp.o

[ 69%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/IOglTF.cpp.o

[ 73%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/StdAfx.cpp.o

[ 78%] Linking CXX shared library ../Release/libIO-glTF.dylib

ld: library not found for -lcpprest.2.4

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *\ [Release/libIO-glTF.dylib] Error 1

make[1]: *\ [IO-glTF/CMakeFiles/IO-glTF.dir/all] Error 2

make: *\ [all] Error 2

Can you make any sense of this? I am out of ideas. Thanks in advance!

— Reply to this email directly or view it on GitHubhttps://github.com/cyrillef/FBX-glTF/issues/2.

tizzle commented 8 years ago

Hey Vijaya,

thank you for pointing me there. This almost solved the problem for me. The files where i had to make those changes were

…/[build.release]/IO-glTF/CMakeFiles/IO-glTF.dir/link.txt and …/[build.release]/glTF/CMakeFiles/glTF.dir/link.txt

Then it compiled like a charm.

Thanks again for helping me on this. I also have to mention that i back the other issue, asking for an update to glTF 1.0 ^^

Have a nice weekend

Best regards Till