Suggestion: MS VC is EXTREMELY finicky about having all the settings be very close on all aspects of everything you are linking. I.e. I would double check to make sure that those settings like "not using MFC" and "Single Threaded-Debug MSVCRT" are all set the SAME amongst everything you are building. (!!) I am *not* an expert on bjam (working on it though) but I know just in the VC world, you WILL get errors like below if you do not have your debugging and threading models all set the same. I would also suggest to you if you setup JUST VC projects for EVERYTHING and get everything to build properly in the MS tool (I am not sure if below is bjam or not) that will at least get you to something that works and it will be easier to take the bjam step from there. You can also make a solution- and then add the individual project files under that one "parent solution" which will make the above steps easier. I hope something there helps (and good luck)..
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Rohit O chokhani Sent: Wednesday, November 03, 2004 10:10 AM To: boost list Subject: [Boost-users] Re:Re: i am stuck since a week here: needhelp:scoping error when trying to make boost work with luabind
thanks brian and aleksey....well i installed the latest beta of visual studio 2005 instead of my mvc 6.0. It did get rid of the block scoping issues and many other compiling issues i was facing. I had to replace the apply_if with eval_if everywhere.
could understand the exact technicalities of that, but read it from some post on the forum and just followed it.....
now, i got different issues though....everything compiles perfect but i get like a million linking issues.......... the details are as follows:
HelloWorld_GameApp.obj :error LNK2019: unresolved external symbol _memcpy_s referenced in function "public: static char * __cdecl std::char_traits<char>::_Copy_s(char *,unsigned int,char const *,unsigned int)" (?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _memmove_s referenced in function "public: static char * __cdecl std::char_traits<char>::_Move_s(char *,unsigned int,char const *,unsigned int)" (?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z) HelloWorld_GameApp.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _free referenced in function "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall std::exception::`scalar deleting destructor'(unsigned int)" (??_Gexception@std@@UAEPAXI@Z) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol "public: __thiscall luabind::module_::module_(struct lua_State *,char const *)" (??0module_@luabind@@QAE@PAUlua_State@@PBD@Z) referenced in function "class luabind::module_ __stdcall luabind::module(struct lua_State *,char const *)" (?module@luabind@@YG?AVmodule_@1@PAUlua_State@@PBD@Z) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _lua_settop@8 referenced in function "class luabind::detail::object_rep * __stdcall luabind::detail::is_class_object(struct lua_State *,int)"
(?is_class_object@detail@luabind@@YGPAVobject_rep@12@PAUlua_State@@H@Z)
HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _lua_toboolean@8 referenced in function "class luabind::detail::object_rep * __stdcall luabind::detail::is_class_object(struct lua_State *,int)"
(?is_class_object@detail@luabind@@YGPAVobject_rep@12@PAUlua_State@@H@Z)
HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _lua_gettable@8 referenced in function "class luabind::detail::object_rep * __stdcall luabind::detail::is_class_object(struct lua_State *,int)"
(?is_class_object@detail@luabind@@YGPAVobject_rep@12@PAUlua_State@@H@Z)
HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _lua_pushstring@8 referenced in function "class luabind::detail::object_rep * __stdcall luabind::detail::is_class_object(struct lua_State *,int)"
(?is_class_object@detail@luabind@@YGPAVobject_rep@12@PAUlua_State@@H@Z)
HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _lua_getmetatable@8 referenced in function "class luabind::detail::object_rep * __stdcall luabind::detail::is_class_object(struct lua_State *,int)"
(?is_class_object@detail@luabind@@YGPAVobject_rep@12@PAUlua_State@@H@Z)
HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _lua_touserdata@8 referenced in function "class luabind::detail::object_rep * __stdcall luabind::detail::is_class_object(struct lua_State *,int)"
(?is_class_object@detail@luabind@@YGPAVobject_rep@12@PAUlua_State@@H@Z)
HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _lua_tonumber@8 referenced in function "public: int __thiscall luabind::detail::primitive_converter<struct luabind::detail::lua_to_cpp>::apply(struct lua_State *,struct luabind::detail::by_value<int>,int)"
(?apply@?$primitive_converter@Ulua_to_cpp@detail@luabind@@@detail@luabin d@
@QAEHPAUlua_State@@U?$by_value@H@23@H@Z) HelloWorld_GameApp.obj : error LNK2001: unresolved external symbol __fltused
..... so on and on
:mpl::bool_<1>,struct luabind::constructor
*,struct luabind::detail::null_type const &)"
(??$def_constructor@U?$constructor@HUnull_type@detail@luabind@@U123@U123 @U
123@U123@U123@U123@U123@U123@@luabind@@Unull_type@detail@2@@?$class_@VMu lt
iObject@@Uunspecified@detail@luabind@@U234@U234@@luabind@@AAEAAU01@U?$bo ol
_@$00@mpl@boost@@PAU?$constructor@HUnull_type@detail@luabind@@U123@U123@ U1
23@U123@U123@U123@U123@U123@@1@ABUnull_type@detail@1@@Z) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol "public: void __thiscall luabind::detail::class_base::add_method(char const *,struct luabind::detail::overload_rep const &)" (?add_method@class_base@detail@luabind@@QAEXPBDABUoverload_rep@23@@Z) referenced in function "private: struct luabind::class_
& __thiscall luabind::class_ ::virtual_def (char const *,void (__thiscall MultiObject::*const &)(int),struct luabind::detail::null_type const &,struct luabind::detail::null_type,struct boost::mpl::bool_<1>)"
(??$virtual_def@P8MultiObject@@AEXH@ZUnull_type@detail@luabind@@@?$class _@
VMultiObject@@Uunspecified@detail@luabind@@U234@U234@@luabind@@AAEAAU01@ PB
DABQ8MultiObject@@AEXH@ZABUnull_type@detail@1@U341@U?$bool_@$00@mpl@boos t@
@@Z) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol "public: void __thiscall luabind::module_::operator[](struct luabind::scope)" (??Amodule_@luabind@@QAEXUscope@1@@Z) referenced in function "public: virtual enum ERROR_CODE __thiscall CTestRoom::OnStartRoom(void)" (?OnStartRoom@CTestRoom@@UAE?AW4ERROR_CODE@@XZ) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol "public: __thiscall luabind::scope::scope(struct luabind::scope const &)" (??0scope@luabind@@QAE@ABU01@@Z) referenced in function "public: virtual enum ERROR_CODE __thiscall CTestRoom::OnStartRoom(void)" (?OnStartRoom@CTestRoom@@UAE?AW4ERROR_CODE@@XZ) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol "void __stdcall luabind::open(struct lua_State *)" (?open@luabind@@YGXPAUlua_State@@@Z) referenced in function "public: virtual enum ERROR_CODE __thiscall CTestRoom::OnStartRoom(void)" (?OnStartRoom@CTestRoom@@UAE?AW4ERROR_CODE@@XZ) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol "public: void __thiscall CxDrawText::SetFont(unsigned int)" (?SetFont@CxDrawText@@QAEXI@Z) referenced in function "public: virtual enum ERROR_CODE __thiscall CTestRoom::OnStartRoom(void)" (?OnStartRoom@CTestRoom@@UAE?AW4ERROR_CODE@@XZ) HelloWorld_GameApp.obj : error LNK2019: unresolved external symbol _atexit referenced in function "void __cdecl g_cTest::`dynamic initializer'(void)" (??__Eg_cTest@@YAXXZ) LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup LINK : error LNK2001: unresolved external symbol __load_config_used n0\HelloWorld_GameAppn0.exe : fatal error LNK1120: 198 unresolved externals Build log was saved at "file://c:\MISC\msvc2005\HelloWorld_GameApp\n0\BuildLog.htm" HelloWorld_GameApp - 199 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
do these link post sound familiar with something you have seen before or they could be my code specific which i will have to dig into.....
well, i am trying to make luabind and boost work with someone elses code.....so i do not completely understand it myself.... just trying to register a few classes from there thru a hello world app and trying to work my way from luabind from there.....
any assitance over here will be appreciated....
also, just to verify, for linking what all .libs need to be listed in the project options... i have lua.lib, lua_debug.lib...
i have the paths for luabind and boost set up as per the documentations...is there anything else that needs to be done to get the environment correct...just wondering if i am missing out on any .libs to be listed in the project settings????
thanks and regards, rohit
---------------------- you wrote:
Brian Braatz] " C:\Program Files\Microsoft Visual
Studio\VC98\"
This shows me you are using VC6. While you "can" do this, you are asking for more pain than anyone should be forced to have. (it is not very compliant and has lots of template quirks. AND you get pages (and pages and pages and pages) of template warnings on valid code (making debugging compile time issues much more difficult)
My *strong* suggestion to you is you install at least Visual Studio .net 2003 which comes with the vc++ 7.1 compiler.
If you cannot purchase this product, the command line compiler is available for free download from: http://msdn.microsoft.com/visualc/vctoolkit2003/
Hope this helps
(been there, done that, got the tee-shirt :) )
--- Rohit O chokhani
wrote: Hi, i am a rookie as far as boost is concerned and i am trying to make boost work but just cant...on the point of giving up on it...so please help asap....
i am trying to use a scripting language called lua with my c++ source code. FOr that I felt the need to use luabind library which is completely dependent on boost.(project specific reasons for selecting luabind)
As a result i need to have boost on my system. For the past 3-4 days ever since i have been trying to make boost works i have been getting all sorts of compilation errors. mainly they are as follows:
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\memory(16) : error C2059: syntax error : 'string' C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\memory(17) : error C2091: function returns function C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\memory(17) : error C2809: 'operator new' has no formal parameters C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\memory(20) : error C2954: template definitions cannot nest
C:\BOOST2\BOOST\boost/mpl/aux_/integral_wrapper.hpp(88)
: fatal error C1506: unrecoverable block scoping error Error executing cl.exe.
i did find some solutions of the various forums of boost recommending to build the latest version from cvs in order to get rid of the scoping issue. however, that hasnt solved my case.
could anyone kindly suggest some fixes, i would really appreciate it, thanks and regards, rohit
__________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail
__________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users