Creo Toolkit make_file can't build
- May 4, 2019
- 2 replies
- 5183 views
Visual Studio 2017
Creo 4.0
Creotool kit has been installed and I have the directory
C:\PTC\Creo 4.0\M070\Common Files\protoolkit
I opened the visual studio solution file (straight from Visual Studio 2017), to run the make file project.
When I first tried to build the make file, I realized I didn't not define
PROTOOL_src=../../../..
This is now defined as:
PROTOOL_src=C:/PTC/CREO4~1.0/M070/COMMON~1/PROTOO~1
Now when I build, I get the following error:
U1077 'cl' : return code '0x1'
Looks like a compiler flag error of some sort.
Here is what my make_install.log states:
cl -c -GS -fp:precise -D_WSTDIO_DEFINED -D_USING_V110_SDK71_ -I. -IC:/PTC/CREO4~1.0/M070/COMMON~1/PROTOO~1/protk_appls/includes -IC:/PTC/CREO4~1.0/M070/COMMON~1/PROTOO~1/includes -DPRO_MACHINE=36 -DPRO_OS=4 C:/PTC/CREO4~1.0/M070/COMMON~1/PROTOO~1/protk_appls/pt_install_test/pt_install_src/TestInstall.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3073: The command "nmake /f make_install dll" exited with code 2.
I simply opened the visual studio solution file using visual studio 2017. I attached a screenshot of how this looks.
I did not do any settings to Visual Studio yet.
The whole make file is copied and pasted below
# -----------------------------------------------------------------------------
# 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=../../../..
PROTOOL_src=C:/PTC/CREO4~1.0/M070/COMMON~1/PROTOO~1
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

