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.

VS2005 error in Pro/toolkit application

toollking

New member
hi folks,


I have the code developed for Wildfire3.0 Protoolkit in C.

Now I want to recompile the code in Visual Studio 2005 with new library and include files for Wildfire4.0.


When I compile the file in Studio 2005 I get the below errors.


platform : visual Studio 2005


File name : main.cpp


Build output : DLL


The errors I get are :


Error1error C2660: 'strcpy' : function does not take 3 arguments
Error2error C2732: linkage specification contradicts earlier specification for 'pro_str_to_wstr'
Error3error C2732: linkage specification contradicts earlier specification for 'pro_wstr_to_str'
Error4error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error5error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error6error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error7error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error8error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error9error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error10error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error11error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error12error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error13error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error14error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error15error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error16error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error17error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error18error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error19error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error20error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error21error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error22error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error23error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error24error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error25error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error26error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error27error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error28error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error29error C2660: 'ProMessageDisplay' : function does not take 4 arguments
Error30error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error31error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error32error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error33error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error34error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error35error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error36error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error37error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error38error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error39error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error40error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error41error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error42error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error43error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error44error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error45error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error46error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error47error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error48error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error49error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error50error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error51error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error52error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error53error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error54error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error55error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error56error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error57error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error58error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error59error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error60error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error61error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error62error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error63error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error64error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error65error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error66error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error67error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error68error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error69error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error70error C2660: 'ProMessageDisplay' : function does not take 2 arguments
Error71error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error72error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error73error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error74error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error75error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error76error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error77error C2660: 'ProMessageDisplay' : function does not take 3 arguments






could any please help on this? your help is appreciated !!
 
Use the preprocessor definition PRO_USE_VAR_ARGS and PRO_USE_VAR_ARG. Additionally you can take a look at the PTC/User Customization TC "Pro/TOOLKIT Next Steps" guide. It details how to setup a 2005 project.
 
Thanks Williaps. I read the user's guide but i am not clear in settings.


I have given my code below, could you tell me where I went wrong? (I am running this C code as C++ code by putting extern "C")


extern "C" int user_initialize(int argc, char *argv[], char *proe_vsn, char *build, wchar_t err_buff[])

{


ProError err;
char dummy[256];

ProFileName UserMsg;


uiCmdCmdId cmd_id;


uiCmdPriority actionPriority =2;


ProStringToWstring(msgfil, "cart_msg.txt");

ProTestErrlogOpen("pt_toolkit", proe_vsn, build);


REPORT = (ProTestRunmodeGet() != TEST_RUN_MODE_SILENT);



err = ProMenuFileRegister("Test", "Test.mnu", &menu_id);


ProStringToWstring (UserMsg, "msg_ugfund.txt");

err =ProCmdActionAdd ("-Test",(uiCmdCmdActFn)UsrUpdateDwg,actionPriority , TestAccessDefault,PRO_B_TRUE, PRO_B_TRUE, &cmd_id);



err =ProMenubarmenuPushbuttonAdd ("Utilities", "-Test","USER -Test", "USER New Button help.","Utilities.psh_util_aux", PRO_B_TRUE,cmd_id, UserMsg);


sprintf(dummy, "%d", err);

ProMessageDisplay(msgfil, "CART %0s",dummy);


ProMessageDisplay(msgfil, "CART %0s", "Test application 16/07/2009");


return(0);
}


Does it affect the application if run as C program?
Edited by: toollking
 
hi folks,


somehow I tried with new visual studio set up and got the DLL but that DLL is not working .


So I am trying with the make file concept(provided by PTC ), because I suppose that the set up done by me may not be correct.They have done some set up there for Visual Studio 2005.


But I solved most fo the errors and still I have some errors to fix it now.


could anyone help on this?


(I believe in this makefile concept , because I got a DLL and it works fine- without any errors).


Error215error LNK2019: unresolved external symbol _user_terminate referenced in function _user_terminate_plus
Error216fatal error LNK1120: 1 unresolved externals
Error217fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\bin\link.EXE"' : return code '0x460'
Error218error PRJ0019: A tool returned an error code from "Performing Makefile project actions"






I thank you all guys who helped me before for their valuable help.
 
Again...please use the document I mentioned in my earlier post. It will walk you through creating a new project in VS 2005. Create a new project by following the guide and then try compiling again.
 
somehow I managed to compile the code successfully using the make files. But now the problem is i get some error at the end of the application .


xtop.exe file throws some exceptions. I want to solve that error for that I need to debug the code.


I do not know how to add the proe in visual studio. Could anyone help on this?


I have solved all the errors. DLL created and I want to debug the code now.
 
I now see the cause of the problem. You are compiling a Wildfire 3.0 Toolkit application. PTC does not support MSVC .NET 2005 with Wildfire 3.0. You need to use MSVC .NET 2003 to compile your program.
 
Hello,

Please check following link for step by step instructions to create Pro/Toolkit project in Visual Studio 2005 (It also provides VS 2005 workspace).

http://ossandcad.blogspot.com/2008/02/protookit-application- using-visual.html

Also, while using WildFire4.0, make sure protk.dat file has
"unicode_encoding" defined. E.g.

NAME ProToolkitDLL
EXEC_FILE ProToolkitDLL.dll
TEXT_DIR .\Text
STARTUP DLL
allow_stop TRUE
revision Wildfire
unicode_encoding FALSE
END

Regards,
Amar Junankar
 
There are different reasons for program errors. Some may be
because of outdated drivers, some because of
manufacturer/developer problems, and sometimes it can also
be because of incompatibility issues. Additionally, corrupt
files can also lead to program errors. And that's what I
think lead to your case.
Edited by: perfectpitcher2
 

Sponsor

Articles From 3DCAD World

Back
Top