Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Building FBX-glTF Release #5

Closed
ryanbartley opened this issue Apr 26, 2016 · 9 comments
Closed

Error Building FBX-glTF Release #5

ryanbartley opened this issue Apr 26, 2016 · 9 comments

Comments

@ryanbartley
Copy link

ryanbartley commented Apr 26, 2016

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, ...) {
@ryanbartley
Copy link
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.

@jazone
Copy link

jazone commented May 11, 2016

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

@frading
Copy link

frading commented May 21, 2016

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

@Peters69
Copy link

Anybody found a solution for that issue?

@elifer5000
Copy link

Having the same problem here.

@ryanbartley
Copy link
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?

@tparisi
Copy link
Collaborator

tparisi commented Jul 30, 2016

@cyrillef @ryanbartley that's a good idea -

@ryanbartley
Copy link
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.

@vijayaprakash
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants