Hi easwaran Hope you would have reveived the mail of Mr. Patrick Williams explaing the method of compling Pro/Toolkit applications. here the process has been explained in great details. This is one of the way Another way which Pro/Engineer provides is using make_files. I have attached a sample workspace along with this for your convinience The following will explain what changes are required in make_files My comments starts with #Abhishek and ends with #Abhishek # File Name MAKEFILENAME = make_Sample #Abhishek # If you change the name of the make file that is this file then replace "make_Sample" with the new file name #Abhishek # Machine Type PRO_MACHINE_TYPE = i486_nt # Executable names EXE = Sample.exe EXE_DLL = Sample.dll #Abhishek #To change the name of final exe or dll replace "Sample.exe" or Sample.dll" with the new file name with extension #Abhishek # Pro/Toolkit Source & Machine Loadpoint (EXTERNAL USE - DEFAULT) PROTOOL = D:/ptc/proe2001 #Abhishek #change the path to location where the ProE is installed on your machine #Abhishek
PROTOOL_src=$(PROTOOL)/protoolkit PROTOOL_SYS = $(PROTOOL_SRC)/$(PRO_MACHINE_TYPE) PRODEV_src=$(PROTOOL)/prodevelop PRODEV_SYS = $(PRODEV_SRC)/$(PRO_MACHINE_TYPE) # Pro/Toolkit Source & Machine Loadpoint (PTC INTERNAL USE) #PROTOOL_src=$(PTCSRC)/protoolkit #PROTOOL_SYS = $(PTCSYS) #PRODEV_src=$(PTCSRC)/prodevelop #PRODEV_SYS = $(PTCSYS) # Include File Paths INCS = -I. -I$(PROTOOL_SRC)/protk_appls/includes -I$(PROTOOL_SRC)/includes \ -I$(PRODEV_SRC)/includes # Compiler Flags CC = cl MACH = -DPRO_MACHINE=29 -DPRO_OS=4 CCFLAGS = -Dhypot=_hypot -DMSB_LEFT -Dfar=ptc_far -Dhuge=p_huge -Dnear=p_near -c -W2 -G4 -Za -D_X86_=1 -D_WSTDIO_DEFINED CFLAGS = $(CCFLAGS) $(INCS) $(MACH) # Libraries PTCLIBS = $(PRODEV_SYS)/obj/prodevelop.lib $(PROTOOL_SYS)/obj/protoolkit.lib PTCLIBS_DLL = $(PRODEV_SYS)/obj/prodev_dll.lib $(PROTOOL_SYS)/obj/protk_dll.lib LIBS = libc.lib kernel32.lib user32.lib wsock32.lib advapi32.lib mpr.lib winspool.lib # Object files OBJS = Sample.obj pt_utils.obj #Abhishek # Replace Sample.obj and pt_utils.obj with the obj file actually created by you program. This will be decided from the below statements (*) . You can also add more .obj files #Abhishek # Linker LINK = link $(EXE) : $(OBJS) $(PTCLIBS) @echo Start at `date` @echo PROTOOL_src=$(PROTOOL_SRC) @echo PROTOOL_SYS = $(PROTOOL_SYS) #Executable applications compiled using WinMain() instead of main() should set the subsystem to windows instead of console. $(LINK) /subsystem:console -out:$(EXE) /debug:none /debugtype:coff /machine:i386 @<<longline.list<br/>$(OBJS) $(PTCLIBS) $(LIBS) << @echo Finished at `date` del $(OBJS) # Dll target dll: $(EXE_DLL) $(EXE_DLL) : $(OBJS) $(PTCLIBS_DLL) @echo Start at `date` @echo PROTOOL_src=$(PROTOOL_SRC) @echo PROTOOL_SYS = $(PROTOOL_SYS) $(LINK) /subsystem:console -out:$(EXE_DLL) /debug:none /debugtype:coff /machine:i386 /dll @<<longline.list<br/>$(OBJS) $(PTCLIBS_DLL) $(LIBS) << @echo Finished at `date` del $(OBJS) # object dependencies PROTK_APPLS = $(PROTOOL_SRC)/protk_appls/pt_examples PROTK_UTILS = $(PROTOOL_SRC)/protk_appls/pt_examples/pt_utils Sample.obj: Sample.c $(CC) $(CFLAGS) Sample.c pt_utils.obj: $(PROTK_UTILS)/pt_utils.c $(CC) $(CFLAGS) $(PROTK_UTILS)/pt_utils.c #Abhishek # (*) This is the section where the .c files are complied and converted into .obj files. make corresponding changes if you change the name of .c files. If you add new .c files then two line in above format for all the new files added #Abhishek
clean : del $(OBJS) del $(EXE) nmake -f $(MAKEFILENAME) clean_dll : del $(OBJS) del $(EXE_DLL) nmake -f $(MAKEFILENAME) dll regards Abhishek
easwaran chandrasekar <-> wrote: hi abishek, thks 4 ur msg. i have license for toolkit.and i have installed it also. . i have also run toolkit test file. i dontknow the way 2 modify the make file for my code. pls help, with regd, easwaran
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.