Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Asynchronous application using MFC

nandini lokesh

New member
Hi All,


I want to create a MFC user interface for a async toolkit application.Can anyone help meto set up development environemnt.





Thanks in Advance,



Edited by: nandini lokesh
 
Hi,


Thanks for your help.


I am working on WF 4.0 - VS 2005


Inedd to create user interface for Asynchronous application using MFC.


I Found settings @ http://www.ptc.com/cs/cs_21/howto/ptk1725/ptk1725.htm


But its giving following errors.


1>stdafx.cpp


1>Compiling...


1>MFC_Demo2.cpp


1>d:\nandini_2012\mfc_demo2\mfc_demo2\mfc_demo2.cpp(76) : warning C4996: 'CWinApp::Enable3dControlsStatic' was declared deprecated


1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(4474) : see declaration of 'CWinApp::Enable3dControlsStatic'


1> Message: 'CWinApp::Enable3dControlsStatic is no longer needed. You should remove this call.'


1>MFC_Demo2Dlg.cpp


1>Generating Code...


1>Compiling resources...


1>Compiling manifest to resources...


1>Linking...


1> Creating library D:\Nandini_2012\MFC_Demo2\Debug\MFC_Demo2.lib and object D:\Nandini_2012\MFC_Demo2\Debug\MFC_Demo2.exp


1>libcpmt.lib(cerr.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>protoolkit.lib(srcnet.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>protoolkit.lib(srcstream.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>protoolkit.lib(srcstdstream.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>libcpmt.lib(cout.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>protoolkit.lib(srcbase.obj) : error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced in function "protected: virtual char const * __thiscall std::ctype<char>::_Do_widen_s(char const *,char const *,char *,unsigned int)const " (?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z)


1>protoolkit.lib(stringsrc.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>protoolkit.lib(osapisrc.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>protoolkit.lib(nmscomm.obj) : error LNK2001: unresolved external symbol __invalid_parameter_noinfo


1>D:\Nandini_2012\MFC_Demo2\Debug\MFC_Demo2.exe : fatal error LNK1120: 1 unresolved externals


1>Build log was saved at "file://d:\Nandini_2012\MFC_Demo2\MFC_Demo2\Debug\BuildLog.h tm"


1>MFC_Demo2 - 10 error(s), 1 warning(s)


========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


And i have tried the setup given in http://www.purplerose.biz/Vin/new_page_2.htm



Here am getting following errors


1>------ Rebuild All started: Project: MFC_Settings, Configuration: Debug Win32 ------


1>Deleting intermediate and output files for project 'MFC_Settings', configuration 'Debug|Win32'


1>Compiling...


1>stdafx.cpp


1>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]


1>Build log was saved at "file://d:\Nandini_2012\MFC_Settings\MFC_Settings\Debug\Buil dLog.htm"


1>MFC_Settings - 1 error(s), 0 warning(s)


========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Because I have selected configuaration type MFC Application output will be .exe. but i have selected runtime libraray MDd as given in the document.


Can you please help me .


Thanks in Advance


Nandini.S.L
 
Why don't you use the standard Pro/TOOLKIT functionalities for creation of a GUI??
smiley11.gif
 
Suggestion give by DonChunior is also correct and valid.It will save much of your efforts of code maintaining the code.

If you still want to stick with MFC then above linking errors should be resolved.. :)
These are caused due to wrong selection of libs and code generation flag.
PTC does not supports /MT flag projects so required libraries are also not available.Change it to /Md and then specific libs like protkmd.lib....
ALso add #define _AFXDLL.

I had got it working at my end using the settings given by PTC , just requires changes I mentioned above.
Edited by: forstudy3
 
Hello forstudy3,


Thanks for the Help. Can u send the complete setting. Because am not sure which configuaration type i should use. Please help me



Edited by: nandini lokesh
 
I had followed same settings as given in PTC
link.Following are the changes I did to my project configuration to resolve the linking errors.

PreprocessorDef - PRO_USE_VAR_ARGS PRO_USE_VAR_ARG _AFXDLL

Set code generation flag as - /MDd
Add libs in linker -
ptasyncmd.lib
protkmd.lib
rodevmd.lib
psapi.lib
netapi32.lib
wsock32.lib
mpr.lib

Ignore Specific Lib-
libcmt.lib

HTH
Thanks
 
Hi Nandini,

You may use Visual Basic for Graphical User Interface and transfer data to Pro/TOOLKIT dll file. This will reduce project efforts, risks, cost, bugs and many other issues.

Happy coding !

Regards,
Akash
 

Sponsor

Articles From 3DCAD World

Back
Top