lukemetz / moonstone

Experimental c++/lua entity system game engine.
4 stars 1 forks source link

Can't build on OS X #7

Open jceipek opened 11 years ago

jceipek commented 11 years ago
==== Building moonstone (debug) ====
main.cpp
Manager.cpp
Ogre_Manager.cpp
OIS_Input_Manager.cpp
register_components.cpp
register_systems.cpp
Camera.cpp
Collider.cpp
Input.cpp
Light.cpp
Lua_Component.cpp
Mesh.cpp
Rigid_Body.cpp
Transform.cpp
AmbientLight.cpp
DeferredLightCP.cpp
DeferredShading.cpp
DLight.cpp
GBufferMaterialGenerator.cpp
GBufferSchemeHandler.cpp
GeomUtils.cpp
LightMaterialGenerator.cpp
MaterialGenerator.cpp
SSAOLogic.cpp
Bullet_Debug_Draw_System.cpp
Bullet_System.cpp
In file included from src/systems/Bullet_System.cpp:1:
In file included from src/systems/Bullet_System.hpp:1:
In file included from src/System.hpp:2:
In file included from /usr/include/c++/4.2.1/string:47:
In file included from /usr/include/c++/4.2.1/memory:54:
/usr/include/c++/4.2.1/bits/stl_construct.h:81:38: error: no matching constructor for initialization of
      'std::basic_string<char>'
      ::new(static_cast<void*>(__p)) _T1(__value);
                                     ^   ~~~~~~~
/usr/include/c++/4.2.1/bits/stl_uninitialized.h:87:6: note: in instantiation of function template specialization
      'std::_Construct<std::basic_string<char>, char>' requested here
            std::_Construct(&*__cur, *__first);
            ^
/usr/include/c++/4.2.1/bits/stl_uninitialized.h:113:14: note: in instantiation of function template
      specialization 'std::__uninitialized_copy_aux<const char *, std::basic_string<char> *>' requested here
      return std::__uninitialized_copy_aux(__first, __last, __result,
             ^
/usr/include/c++/4.2.1/bits/stl_uninitialized.h:254:14: note: in instantiation of function template
      specialization 'std::uninitialized_copy<const char *, std::basic_string<char> *>' requested here
    { return std::uninitialized_copy(__first, __last, __result); }
             ^
/usr/include/c++/4.2.1/bits/stl_vector.h:826:6: note: in instantiation of function template specialization
      'std::__uninitialized_copy_a<const char *, std::basic_string<char> *, std::basic_string<char> >' requested
      here
            std::__uninitialized_copy_a(__first, __last,
            ^
/usr/include/c++/4.2.1/bits/stl_vector.h:803:4: note: in instantiation of function template specialization
      'std::vector<std::basic_string<char>, std::allocator<std::basic_string<char>> >::_M_range_initialize<const
      char *>' requested here
          _M_range_initialize(__first, __last, _IterCategory());
          ^
/usr/include/c++/4.2.1/bits/stl_vector.h:261:4: note: in instantiation of function template specialization
      'std::vector<std::basic_string<char>, std::allocator<std::basic_string<char>>
      >::_M_initialize_dispatch<const char *>' requested here
          _M_initialize_dispatch(__first, __last, _Integral());
          ^
src/systems/Bullet_System.cpp:17:41: note: in instantiation of function template specialization
      'std::vector<std::basic_string<char>, std::allocator<std::basic_string<char>> >::vector<const char *>'
      requested here
  std::vector<std::string> mesh_types = {"Rigid_Body", "Transform"};
                                        ^
/usr/include/c++/4.2.1/bits/basic_string.h:469:7: note: candidate constructor not viable: no known conversion
      from 'const char' to 'const char *' for 1st argument; take the address of the argument with &
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:427:7: note: candidate constructor not viable: no known conversion
      from 'const char' to 'const std::allocator<char>' for 1st argument;
      basic_string(const _Alloc& __a);
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:434:7: note: candidate constructor not viable: no known conversion
      from 'const char' to 'const std::basic_string<char>' for 1st argument;
      basic_string(const basic_string& __str);
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:485:9: note: candidate constructor template not viable: requires at
      least 2 arguments, but 1 was provided
        basic_string(_InputIterator __beg, _InputIterator __end,
        ^
/usr/include/c++/4.2.1/bits/basic_string.h:421:7: note: candidate constructor not viable: requires 0 arguments,
      but 1 was provided
      basic_string();
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:441:7: note: candidate constructor not viable: requires at least 2
      arguments, but 1 was provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:450:7: note: candidate constructor not viable: requires 4 arguments,
      but 1 was provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:462:7: note: candidate constructor not viable: requires at least 2
      arguments, but 1 was provided
      basic_string(const _CharT* __s, size_type __n,
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:476:7: note: candidate constructor not viable: requires at least 2
      arguments, but 1 was provided
      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
      ^
1 error generated.
make[1]: *** [obj/Debug/Bullet_System.o] Error 1
make: *** [moonstone] Error 2
jceipek commented 11 years ago
==== Building moonstone (debug) ====
Creating obj/Debug
bindings.cpp
Bullet_Manager.cpp
init_from_lua.cpp
Lua_Manager.cpp
main.cpp
Manager.cpp
Ogre_Manager.cpp
OIS_Input_Manager.cpp
register_components.cpp
register_systems.cpp
Camera.cpp
Collider.cpp
Input.cpp
Light.cpp
Lua_Component.cpp
Mesh.cpp
Rigid_Body.cpp
Transform.cpp
AmbientLight.cpp
DeferredLightCP.cpp
DeferredShading.cpp
DLight.cpp
GBufferMaterialGenerator.cpp
GBufferSchemeHandler.cpp
GeomUtils.cpp
LightMaterialGenerator.cpp
MaterialGenerator.cpp
SSAOLogic.cpp
Bullet_Debug_Draw_System.cpp
Bullet_System.cpp
Lua_System.cpp
src/systems/Lua_System.cpp:75:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
1 warning generated.
Ogre_Render_System.cpp
In file included from src/systems/Ogre_Render_System.cpp:1:
In file included from src/systems/Ogre_Render_System.hpp:3:
In file included from src/Ogre_Manager.hpp:2:
In file included from /usr/include/OGRE/OgreCamera.h:32:
In file included from /usr/include/OGRE/OgrePrerequisites.h:33:
In file included from /usr/include/c++/4.2.1/string:47:
In file included from /usr/include/c++/4.2.1/memory:54:
/usr/include/c++/4.2.1/bits/stl_construct.h:81:38: error: no matching constructor for initialization of 'std::basic_string<char>'
      ::new(static_cast<void*>(__p)) _T1(__value);
                                     ^   ~~~~~~~
/usr/include/c++/4.2.1/bits/stl_uninitialized.h:87:6: note: in instantiation of function template specialization
      'std::_Construct<std::basic_string<char>, char>' requested here
            std::_Construct(&*__cur, *__first);
            ^
/usr/include/c++/4.2.1/bits/stl_uninitialized.h:113:14: note: in instantiation of function template specialization
      'std::__uninitialized_copy_aux<const char *, std::basic_string<char> *>' requested here
      return std::__uninitialized_copy_aux(__first, __last, __result,
             ^
/usr/include/c++/4.2.1/bits/stl_uninitialized.h:254:14: note: in instantiation of function template specialization
      'std::uninitialized_copy<const char *, std::basic_string<char> *>' requested here
    { return std::uninitialized_copy(__first, __last, __result); }
             ^
/usr/include/c++/4.2.1/bits/stl_vector.h:826:6: note: in instantiation of function template specialization
      'std::__uninitialized_copy_a<const char *, std::basic_string<char> *, std::basic_string<char> >' requested here
            std::__uninitialized_copy_a(__first, __last,
            ^
/usr/include/c++/4.2.1/bits/stl_vector.h:803:4: note: in instantiation of function template specialization
      'std::vector<std::basic_string<char>, std::allocator<std::basic_string<char>> >::_M_range_initialize<const char *>' requested here
          _M_range_initialize(__first, __last, _IterCategory());
          ^
/usr/include/c++/4.2.1/bits/stl_vector.h:261:4: note: in instantiation of function template specialization
      'std::vector<std::basic_string<char>, std::allocator<std::basic_string<char>> >::_M_initialize_dispatch<const char *>' requested
      here
          _M_initialize_dispatch(__first, __last, _Integral());
          ^
src/systems/Ogre_Render_System.cpp:30:41: note: in instantiation of function template specialization
      'std::vector<std::basic_string<char>, std::allocator<std::basic_string<char>> >::vector<const char *>' requested here
  std::vector<std::string> mesh_types = {"Transform", "Mesh"};
                                        ^
/usr/include/c++/4.2.1/bits/basic_string.h:469:7: note: candidate constructor not viable: no known conversion from 'const char' to
      'const char *' for 1st argument; take the address of the argument with &
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:427:7: note: candidate constructor not viable: no known conversion from 'const char' to
      'const std::allocator<char>' for 1st argument;
      basic_string(const _Alloc& __a);
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:434:7: note: candidate constructor not viable: no known conversion from 'const char' to
      'const std::basic_string<char>' for 1st argument;
      basic_string(const basic_string& __str);
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:485:9: note: candidate constructor template not viable: requires at least 2 arguments, but 1
      was provided
        basic_string(_InputIterator __beg, _InputIterator __end,
        ^
/usr/include/c++/4.2.1/bits/basic_string.h:421:7: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
      basic_string();
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:441:7: note: candidate constructor not viable: requires at least 2 arguments, but 1 was
      provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:450:7: note: candidate constructor not viable: requires 4 arguments, but 1 was provided
      basic_string(const basic_string& __str, size_type __pos,
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:462:7: note: candidate constructor not viable: requires at least 2 arguments, but 1 was
      provided
      basic_string(const _CharT* __s, size_type __n,
      ^
/usr/include/c++/4.2.1/bits/basic_string.h:476:7: note: candidate constructor not viable: requires at least 2 arguments, but 1 was
      provided
      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
      ^
1 error generated.
make[1]: *** [obj/Debug/Ogre_Render_System.o] Error 1
make: *** [moonstone] Error 2
lukemetz commented 11 years ago

Default osx compiler does not support vector initializes in the form of: std::vector<std::string> vector = {"Thing1", "Thing2"}; One has to rewrite to something like: std::vector<std::string> vector; vector.push_back("Thing1"); vector.push_back("Thing2"}; I am still looking into a more elegant way to do this.

lukemetz commented 11 years ago

Now there is an issue with function pointers to templates. The create_inst does not appear to link. I was also having trouble with linking the ogre3d framework. One might have to build it from source.