The command "nmake /f make_install dll" exited with code 2.
- August 28, 2023
- 2 replies
- 2432 views
I have been trying to build the protk_install_example solution provided by PTC and facing the errors shown in the screenshots below. I am using Creo 7.0.2.0 and VS19 to build the solution. The makefile is defined as follows,
# -----------------------------------------------------------------------------
# File Name
MAKEFILENAME = make_install
# Machine Type
PRO_MACHINE_TYPE = x86e_win64
# Executable names
EXE = pt_inst_test.exe
EXE_DLL = pt_inst_test.dll
# Pro/Toolkit Source & Machine Loadpoint (EXTERNAL USE - DEFAULT)
PROTOOL_src=$(PROE_INSTALL_PATH)/protoolkit
PROTOOL_SYS = $(PROTOOL_SRC)/$(PRO_MACHINE_TYPE)
# Pro/Toolkit Source & Machine Loadpoint (PTC INTERNAL USE)
#PROTOOL_src=$(PTCSRC)/protoolkit
#PROTOOL_SYS = $(PTCSYS)
ICU_PATH = $(PROTOOL_SYS)/obj
# Include File Paths
INCS = -I. -I$(PROTOOL_SRC)/protk_appls/includes -I$(PROTOOL_SRC)/includes
# Compiler Flags
CC = cl
MACH = -DPRO_MACHINE=36 -DPRO_OS=4
CCFLAGS = -c -GS -fp:precise -D_WSTDIO_DEFINED -D_USING_V110_SDK71_
CFLAGS = $(CCFLAGS) $(INCS) $(MACH)
# Libraries
PTCLIBS = $(PROTOOL_SYS)/obj/protoolkit_NU.lib \
$(ICU_PATH)/ucore.lib \
$(ICU_PATH)/udata.lib
PTCLIBS_DLL = $(PROTOOL_SYS)/obj/protk_dll_NU.lib \
$(ICU_PATH)/ucore.lib \
$(ICU_PATH)/udata.lib
LIBS = libcmt.lib kernel32.lib user32.lib wsock32.lib advapi32.lib mpr.lib winspool.lib netapi32.lib psapi.lib gdi32.lib shell32.lib comdlg32.lib ole32.lib ws2_32.lib
# Object files
OBJS = TestInstall.obj TestError.obj TestRunmode.obj UtilString.obj PTApplsUnicodeUtils.obj
# Linker
LINK = link
$(EXE) : $(OBJS) $(PTCLIBS)
#Executable applications compiled using WinMain() instead of main() should set the subsystem to windows instead of console.
$(LINK) /subsystem:console -out:$(EXE) /debug:none /machine:amd64 @<<longline.list
$(OBJS) $(PTCLIBS) $(LIBS)
<<
del $(OBJS)
# Dll target
dll: $(EXE_DLL)
$(EXE_DLL) : $(OBJS) $(PTCLIBS_DLL)
$(LINK) /subsystem:console -out:$(EXE_DLL) /debug:none /machine:amd64 /dll @<<longline.list
$(OBJS) $(PTCLIBS_DLL) $(LIBS)
<<
del $(OBJS)
# object dependencies
PROTK_INST = $(PROTOOL_SRC)/protk_appls/pt_install_test/pt_install_src
PROTK_UTILS = $(PROTOOL_SRC)/protk_appls/pt_examples/pt_utils
TestInstall.obj: $(PROTK_INST)/TestInstall.c
$(CC) $(CFLAGS) $(PROTK_INST)/TestInstall.c
TestError.obj: $(PROTK_UTILS)/TestError.c
$(CC) $(CFLAGS) $(PROTK_UTILS)/TestError.c
TestRunmode.obj: $(PROTK_UTILS)/TestRunmode.c
$(CC) $(CFLAGS) $(PROTK_UTILS)/TestRunmode.c
UtilString.obj: $(PROTK_UTILS)/UtilString.c
$(CC) $(CFLAGS) $(PROTK_UTILS)/UtilString.c
PTApplsUnicodeUtils.obj: $(PROTK_UTILS)/PTApplsUnicodeUtils.c
$(CC) $(CFLAGS) $(PROTK_UTILS)/PTApplsUnicodeUtils.c
clean :
del $(OBJS)
del $(EXE)
nmake -f $(MAKEFILENAME)
clean_dll :
del $(OBJS)
del $(EXE_DLL)
nmake -f $(MAKEFILENAME) dll
# -----------------------------------------------------------------------------
I have given the env. variable PROE_INSTALL_PATH as "C:\PTC\Creo7.0.2.0\Common_Files".
I request the community to help me solve this issue. TIA

