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.

Windows error LNK1179 -


i compiled exe on windows vs 2005, c++ program link other libs of mine. compiled , doesn't error of lnk1170 comdat "

i can't understand happened , how solve problem.

thanks

there many issues concerning bug including:

  • using of unnamed stuff (struct, class, namespace)
  • instantiation of template parameter
  • incremental linking
  • ...

i experienced bug in situation this:

template < class inputiterator > id findorinsertsomething( const std::string & name, inputiterator begin, inputiterator end ) {     id out;     {         static std::string sql( calculatequerya() );         if (findsomething( sql, name, out ))             return out;     }      static std::string sql( calculatequeryb() );     out = insertsomehing( sql, name, begin, end );     return out; } 

when used in code, link error lnk1179 occurred. problem simple. without /h switch, maximum length of names can 2047 characters. when using template stuff, long names created. in example there 2 static variables same name. named like:

sql?something-like-function-signature?something-like-block-signature 

what can longer 2047 characters. because something-like-block-signature @ end, behind 2047 boundary, making both sql variables same linker.

solution easy:

  • using different names
  • hide optimization in function (will not calculated each version of template)

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 -