Hi Asif & Thomas,
 
Since Asif wants to use VC++ 2010 Express, he should use SmartWin2010.zip from http://sourceforge.net/projects/smartwin/files/ which was built with VS2010 C++, and use the sample programs in the smartwin\tests subdirectory. HelloSmartWin was intended as a example of many of the standard smartwin widgets.
 
I just downloaded the VC++ 2010 Express and SmartWin2010.zip, and opened the smartwin\tests\SmartwinUnitTests solution.
Edited smartwin\smartwinprops.props to fix the library and include path for the unzipped location.
 
Built smartwin with vc++ 2010
Built and ran HelloSmartWinWorld
Built and ran HelloSmartWin
 
http://sourceforge.net/projects/smartwin/forums/forum/318867/topic/3761023 explains that I put SmartWin2010.zip up so that people could see how to use Smartwin with VS2010.
 
Asif apparently was tryng to compile some old examples with a newer library.  Perhaps he found some stale online documentation which was never updated to match the most recent library downloads.  For example,  the member function “setSize” was changed to be “setBounds“ in 2005, between the versions 0.99 and 1.00.
               e:\projects\scratch\test04\test04\test04.cpp(39): error C3861: 'setSize': identifier not found
 
Asif, Where did you get test04.cpp ?
 
Best regards, Andrew
 
 
Sent: Friday, March 18, 2011 12:50 PM
Subject: Re: [SmartWin-General] SmartWin build fails - doesn't convert/load
 
On Fri, Mar 18, 2011 at 3:17 AM, asif saeed <asif.lse2@gmail.com> wrote:
Hi,

I am a newbie to SmartWin and really like your library - it is really simple and elegant - I have just read the online examples.

The problem is that the VC++ 2010 Express doesn't convert the project (0 files converted is the message) when I download SmartWin2010.zip from http://sourceforge.net/projects/smartwin/files/ and try to open the solution file.

Downloading SmartWin1.0.2.zip and opening the solution as specified in the online example (http://smartwin.sourceforge.net/getting_started.php) results in red underlines in some functions (perhaps related to sizing - I have deleted the whole project so cannot recall right now). But I'd really like to work with the latest build using VC++ 2010 Express.

I'd be thankful for any help in this respect.

 
Hi Asif,
 
You [probably] need to open the project files, using something such as Notepad or something, and edit the project files.
 
My *guess* is that there are some custom build steps, like for instance; Pre-Build Step - which are not compatible with VS 2010 ... :(
 
 
.t

--
Thomas Hansen
415-515-6460
http://winergyinc.com - Harvesting Loyal Fans and Ambassadors for YOUR winery



Hi,

I get the following errors on building the SmartWin2010.zip RC5:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1>------ Build started: Project: test04, Configuration: Debug Win32 ------
1> test04.cpp
1> Unknown compiler version - please run the configure tests and report the results
1>e:\projects\scratch\test04\test04\test04.cpp(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\projects\scratch\test04\test04\test04.cpp(64): error C2143: syntax error : missing ',' before '&'
1>e:\projects\scratch\test04\test04\test04.cpp(39): error C3861: 'setSize': identifier not found
1>e:\projects\scratch\test04\test04\test04.cpp(44): error C2039: 'setSize' : is not a member of 'SmartWin::WidgetButton<EventHandlerClass,MessageMapPolicy>'
1> with
1> [
1> EventHandlerClass=HelloWinClass,
1> MessageMapPolicy=SmartWin::MessageMapPolicyNormalWidget
1> ]
1>e:\projects\scratch\test04\test04\test04.cpp(48): error C2039: 'setSize' : is not a member of 'SmartWin::WidgetCheckBox<EventHandlerClass,MessageMapPolicy>'
1> with
1> [
1> EventHandlerClass=HelloWinClass,
1> MessageMapPolicy=SmartWin::MessageMapPolicyNormalWidget
1> ]
1>e:\projects\scratch\test04\test04\test04.cpp(54): error C2664: 'void SmartWin::WidgetMenu<EventHandlerClass,MessageMapPolicy>::appendItem(unsigned int,const SmartUtil::tstring &,void (__thiscall HelloWinClass::* )(boost::shared_ptr<T>,unsigned int))' : cannot convert parameter 3 from 'void (__thiscall HelloWinClass::* )(SmartWin::WidgetMenu<EventHandlerClass,MessageMapPolicy> *,unsigned int)' to'void (__thiscall HelloWinClass::* )(boost::shared_ptr<T>,unsigned int)'
1> with
1> [
1> EventHandlerClass=HelloWinClass,
1> MessageMapPolicy=SmartWin::MessageMapPolicyNormalWidget,
1> T=SmartWin::WidgetMenu<HelloWinClass,SmartWin::MessageMapPolicyNormalWidget>
1> ]
1> and
1> [
1> EventHandlerClass=HelloWinClass,
1> MessageMapPolicy=SmartWin::MessageMapPolicyNormalWidget
1> ]
1> and
1> [
1> T=SmartWin::WidgetMenu<HelloWinClass,SmartWin::MessageMapPolicyNormalWidget>
1> ]
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>e:\projects\scratch\test04\test04\test04.cpp(55): error C2664: 'void SmartWin::WidgetMenu<EventHandlerClass,MessageMapPolicy>::appendItem(unsigned int,const SmartUtil::tstring &,void (__thiscall HelloWinClass::* )(boost::shared_ptr<T>,unsigned int))' : cannot convert parameter 3 from 'void (__thiscall HelloWinClass::* )(SmartWin::WidgetMenu<EventHandlerClass,MessageMapPolicy> *,unsigned int)' to'void (__thiscall HelloWinClass::* )(boost::shared_ptr<T>,unsigned int)'
1> with
1> [
1> EventHandlerClass=HelloWinClass,
1> MessageMapPolicy=SmartWin::MessageMapPolicyNormalWidget,
1> T=SmartWin::WidgetMenu<HelloWinClass,SmartWin::MessageMapPolicyNormalWidget>
1> ]
1> and
1> [
1> EventHandlerClass=HelloWinClass,
1> MessageMapPolicy=SmartWin::MessageMapPolicyNormalWidget
1> ]
1> and
1> [
1> T=SmartWin::WidgetMenu<HelloWinClass,SmartWin::MessageMapPolicyNormalWidget>
1> ]
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>e:\projects\scratch\test04\test04\test04.cpp(61): error C2664: 'void SmartWin::AspectSizable<EventHandlerClass,WidgetType,MessageMapType>::onSized(void (__thiscall HelloWinClass::* )(const SmartWin::WidgetSizedEventResult &))' : cannot convert parameter 1 from 'void (__thiscall HelloWinClass::* )(const int)' to 'void (__thiscall HelloWinClass::* )(const SmartWin::WidgetSizedEventResult &)'
1> with
1> [
1> EventHandlerClass=HelloWinClass,
1> WidgetType=SmartWin::WidgetWindowBase<HelloWinClass,SmartWin::MessageMapPolicyNormalWidget>,
1> MessageMapType=SmartWin::MessageMap<HelloWinClass,SmartWin::MessageMapPolicyNormalWidget>
1> ]
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>e:\projects\scratch\test04\test04\test04.cpp(72): error C2228: left of '.size' must have class/struct/union
1> type is ''unknown-type''
1>e:\projects\scratch\test04\test04\test04.cpp(72): error C3861: 'getSizeClientArea': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d