Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c++ - undefined reference to `__stack_chk_fail' -


getting error while compiling c++ code:

undefined reference `__stack_chk_fail' 

options tried:

  1. added -fno-stack-protector while compiling - did not work, error persists
  2. added dummy implementation of void __stack_chk_fail(void) in code. still getting same error.

detailed error:

/u/ac/alanger/gurobi/gurobi400/linux64/lib/libgurobi_c++.a(env.o)(.text+0x1034): in function `grbenv::getpar/u/ac/alanger/gurobi/gurobi400/linux64/lib/libgurobi_c++.a(env.o)(.text+0x1034): in function `grbenv::getparaminfo(grb_stringparam, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)': : undefined reference `__stack_chk_fail' aminfo(grb_stringparam, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)': : **undefined reference `__stack_chk_fail'** 

earlier, getting 10's of such errors. found out there version mismatch between gcc of pre-compiled libraries using , gcc version using compile code. updated gcc , getting 2 of these errors.

any help, please?

libgurobi_c++.a compiled -fno-stack-protector (obviously).

a few things come mind:

  1. add -fno-stack-protector when linking. make sure libssp gets linked.
  2. manually link -lssp
  3. make dummy version of __stack_chk_fail(void) in it's own object file , and add .o file linker command after libgurobi_c++.a. gcc/g++ resolves symbols left right during linking despite code having function defined, copy of object containing __stack_chk_fail symbol needs on linker line right of libgurobi_c++.a.

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -