cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Creo Toolkit make_file can't build

dschouster
5-Regular Member

Creo Toolkit make_file can't build

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)
 @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 /machine:amd64 @<<longline.list
$(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 /machine:amd64 /dll @<<longline.list
$(OBJS) $(PTCLIBS_DLL) $(LIBS)
<<

 @echo Finished at `date`
 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

6 REPLIES 6

Creo 4.0 requires VS 2015. Try with Visual Studio 2015 instead of VS 2017.

 

Additionally, you remove all OBJ definitions and just include one cpp file into your solution and try building the solution.

dschouster
5-Regular Member
(To:Ketan_Lalcheta)

Supposedly VS 2017 is fully backwards compatible to run VS 2015 projects.

I can't simply install VS 2015 on my CPU due to restrictions at my company.

When I open the solution file, it even has (Visual Studio 2015) next to the make_install on my solution explorer.

 

As far as removing all OBJ definitions, that begins to go into territory I'd rather avoid as I am learning Creo toolkit for the first time.

 

I'd rather understand why the 'cl' : return code '0x1' is happening and fix it.

 

 

 

In your log file just above the line with "error code '0x1' it also shows:

 'cl' is not recognized as an internal or external command,
operable program or batch file.

 

in other words the system does not know the location of cl.exe file. You will need to check your Visual Studio settings. Most likely the PATH system variable is missing the directory where the cl.exe is located.

dschouster
5-Regular Member
(To:GabrielZaha)

Thanks, I will look into this and see if I can find how to path this when I get back into work tomorrow.

Hello @dschouster

 

If the above post resolves your issue or answers your question, please mark it as an Accepted Solution. This will help ensure other community members with the same question can quickly find an answer.

 

Thank you both for your contributions to the PTC community!

 

PTCModerator
 

bbigelow
4-Participant
(To:PTCModerator)

I am converting from Creo 3.0 to 4.0. I have installed Visual Studio 2015. I'm having issues getting my code to compile right out of the gate. What compiled fine in Creo 3.0 doesn't compile now. I did back up and try to compile the sample files they give. Make_install but get an error

NMAKE: fatal error U1073: don't know how to make "../../protk_appls/pt_install_test/pt_install_src/TestInstall.c

 

The only thing I use Visual Studio for is to compile using the x64 Native Tools Command Prompt.

Do I need to setup something in Visual Studio 2015?

I am new to all of this.

thanks

Announcements


Top Tags