8000 Error Building FBX-glTF Release · Issue #5 · cyrillef/FBX-glTF · GitHub
[go: up one dir, main page]

Skip to content

Error Building FBX-glTF Release #5

Closed

Description

@ryanbartley

Building on Mac OSX, I've run into this error...

In file included from /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/glslShader.cpp:22:
/Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/glslShader.h:51:7: error: class member cannot be redeclared
        void appendCode (const utility::char_t *format, ...) ;
             ^
/Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/glslShader.h:50:7: note: previous declaration is here
        void appendCode (const char *format, ...) ;
             ^
/Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/glslShader.cpp:96:18: error: redefinition of 'appendCode'
void glslShader::appendCode (const utility::char_t *format, ...) {
                 ^
/Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/glslShader.cpp:83:18: note: previous definition is here
void glslShader::appendCode (const char *format, ...) {

Activity

  1. ryanbartley commented on May 2, 2016

    @ryanbartley
    Author

    So, it looks like it couldn't find libcpprest...I updated it to look for 2.8, which is the one I had to install. Yet the problem above still existed. I removed the appendCode( const utility::char_t...) from .h and .cpp, which is probably not correct but it continued to build after that and now I'm getting these errors...

    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:305:71: error: non-const lvalue reference to
          type 'fbxsdk_2015_1::FbxProperty' cannot bind to a temporary of type 'fbxsdk_2015_1::FbxProperty'
                    pPhongSurface->TransparencyFactor, pPhongSurface->TransparentColor, pPhongSurface->FindProperty ("Opacity"),
                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:190:91: note: passing argument to parameter
          'propertyOpaque' here
            FbxPropertyT<FbxDouble> &property, FbxPropertyT<FbxDouble3> &propertyColor, FbxProperty &propertyOpaque,
                                                                                                     ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:340:75: error: non-const lvalue reference to
          type 'fbxsdk_2015_1::FbxProperty' cannot bind to a temporary of type 'fbxsdk_2015_1::FbxProperty'
      ...pLambertSurface->TransparencyFactor, pLambertSurface->TransparentColor, pLambertSurface->FindProperty ("Opacity"),
                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:190:91: note: passing argument to parameter
          'propertyOpaque' here
            FbxPropertyT<FbxDouble> &property, FbxPropertyT<FbxDouble3> &propertyColor, FbxProperty &propertyOpaque,
                                                                                                     ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/glslShader.cpp:514:90: error: cannot pass object of non-trivial type
          'utility::string_t' (aka 'basic_string<char, char_traits<char>, allocator<char> >') through variadic method; call will
          abort at runtime [-Wnon-pod-varargs]
      ..._fragmentShader.appendCode (U("if ( cosAngle > cos (radians (u_%s * 0.5)) ) {\n"), szLightFallOffAngle) ;
                                                                                            ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/glslShader.cpp:515:90: error: cannot pass object of non-trivial type
          'utility::string_t' (aka 'basic_string<char, char_traits<char>, allocator<char> >') through variadic method; call will
          abort at runtime [-Wnon-pod-varargs]
      ..._fragmentShader.appendCode (U("attenuation *=max (0., pow (cosAngle, u_%s)) ;\n"), szLightFallOffExponent) ;
                                                                                            ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:369:34: error: non-const lvalue reference to
          type 'fbxsdk_2015_1::FbxProperty' cannot bind to a temporary of type 'fbxsdk_2015_1::FbxProperty'
                    factorProperty, colorProperty, pMaterial->FindProperty ("Opacity"),
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:190:91: note: passing argument to parameter
          'propertyOpaque' here
            FbxPropertyT<FbxDouble> &property, FbxPropertyT<FbxDouble3> &propertyColor, FbxProperty &propertyOpaque,
                                                                                                     ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:404:34: error: non-const lvalue reference to
          type 'fbxsdk_2015_1::FbxProperty' cannot bind to a temporary of type 'fbxsdk_2015_1::FbxProperty'
                    factorProperty, colorProperty, pMaterial->FindProperty ("Opacity"),
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:190:91: note: passing argument to parameter
          'propertyOpaque' here
            FbxPropertyT<FbxDouble> &property, FbxPropertyT<FbxDouble3> &propertyColor, FbxProperty &propertyOpaque,
                                                                                                     ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:448:34: error: non-const lvalue reference to
          type 'fbxsdk_2015_1::FbxProperty' cannot bind to a temporary of type 'fbxsdk_2015_1::FbxProperty'
                    factorProperty, colorProperty, pMaterial->FindProperty ("Opacity"),
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Material.cpp:190:91: note: passing argument to parameter
          'propertyOpaque' here
            FbxPropertyT<FbxDouble> &property, FbxPropertyT<FbxDouble3> &propertyColor, FbxProperty &propertyOpaque,
                                                                                                     ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Shaders.cpp:80:50: error: use of undeclared identifier
          'fileName'
                                    shaderFilename =FbxPathUtils::GetFolderName (fileName) + "/" + shaderFilename ;
                                                                                 ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Shaders.cpp:84:23: error: cannot initialize a parameter of
          type 'const char_type *' (aka 'const wchar_t *') with an rvalue of type 'const value_type *' (aka 'const char *')
                                    shaderFile.write (tech.vertexShader ().source ().c_str (), tech.vertexShader ().source ()...
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:212:43: note: 
          passing argument to parameter '__s' here
        basic_ostream& write(const char_type* __s, streamsize __n);
                                              ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Shaders.cpp:93:50: error: use of undeclared identifier
          'fileName'
                                    shaderFilename =FbxPathUtils::GetFolderName (fileName) + "/" + shaderFilename ;
                                                                                 ^
    /Users/ryanbartley/Documents/glTF/FBX2GLTF/FBX-glTF/IO-glTF/gltfWriter-Shaders.cpp:97:23: error: cannot initialize a parameter of
          type 'const char_type *' (aka 'const wchar_t *') with an rvalue of type 'const value_type *' (aka 'const char *')
                                    shaderFile.write (tech.fragmentShader ().source ().c_str (), tech.fragmentShader ().sourc...
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:212:43: note: 
          passing argument to parameter '__s' here
        basic_ostream& write(const char_type* __s, streamsize __n);
    

    Any help with these build problems would be greatly appreciated.

  2. jazone commented on May 11, 2016

    @jazone

    I'm having the exact problem as @ryanbartley.
    So if anyone knows how to get through this we'll be both very pleased !!
    Here is the output of my make command after I updated the libcpprest path to 2.8 :

    [  3%] Building CXX object IO-glTF/CMakeFiles/IO-glTF.dir/glslShader.cpp.o
    In file included from /Applications/FBX-glTF/IO-glTF/glslShader.cpp:22:
    /Applications/FBX-glTF/IO-glTF/glslShader.h:51:7: error: class member cannot be
          redeclared
            void appendCode (const utility::char_t *format, ...) ;
                 ^
    /Applications/FBX-glTF/IO-glTF/glslShader.h:50:7: note: previous declaration is
          here
            void appendCode (const char *format, ...) ;
                 ^
    /Applications/FBX-glTF/IO-glTF/glslShader.cpp:96:18: error: redefinition of
          'appendCode'
    void glslShader::appendCode (const utility::char_t *format, ...) {
                     ^
    /Applications/FBX-glTF/IO-glTF/glslShader.cpp:83:18: note: previous definition
          is here
    void glslShader::appendCode (const char *format, ...) {
                     ^
    2 errors generated.
    make[2]: *** [IO-glTF/CMakeFiles/IO-glTF.dir/glslShader.cpp.o] Error 1
    make[1]: *** [IO-glTF/CMakeFiles/IO-glTF.dir/all] Error 2
    make: *** [all] Error 2
    
  3. frading commented on May 21, 2016

    @frading

    Same problem for me too, unfortunately. Same output as @ryanbartley and @jazone. Would love to know the solution if there is one.

  4. Peters69 commented on Jul 13, 2016

    @Peters69

    Anybody found a solution for that issue?

  5. elifer5000 commented on Jul 14, 2016

    @elifer5000

    Having the same problem here.

  6. ryanbartley commented on Jul 30, 2016

    @ryanbartley
    Author

    Is this project closed? Would you be willing to take a PR replacing the enormous dependency of Casablanca AKA C++REST with a simple header only json engine?

  7. tparisi commented on Jul 30, 2016

    @tparisi
    Collaborator
    7C01

    @cyrillef @ryanbartley that's a good idea -

  8. ryanbartley commented on Jul 31, 2016

    @ryanbartley
    Author

    Preliminary work of swapping out the json engine can be found here. Tested and working on OSX. Need to update windows and linux, which I can do this week.

  9. vijayaprakash commented on Nov 9, 2016

    @vijayaprakash
    Collaborator

    Hi,

    I am extremely sorry for the delay.
    The build issue has been fixed in 'dev' branch.

    Thanks,
    Vijaya Praaksh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0