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

Toolkit Asynchronous Application Configuration

SOLVED
Highlighted
Moonstone

Toolkit Asynchronous Application Configuration

Hello,

I am getting below mentioned error when trying  to create Toolkit Asynchronous example.

error LNK2019: unresolved external symbol_ProEngineerStart referenced in function_main()


I have used example file provided in toolkit installation folder → simple_async.

Anyone can help to configure t for Toolkit Asynchronous application

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Toolkit Asynchronous Application Configuration

The Problem is Solved,

I missed pt_asynchronous.lib in the Linker

View solution in original post

6 REPLIES 6
Highlighted

Re: Toolkit Asynchronous Application Configuration

Are you using their 'make_simple_async' makefile?

What tool are you using for the compilation and for which Creo version?

Highlighted

Re: Toolkit Asynchronous Application Configuration

Yes Tomas,

I am using make_simple_async

Creo Version 2.0

Visual Studio V2010

Highlighted

Re: Toolkit Asynchronous Application Configuration

Ok, that's correct. Could you please post the whole output of the compilation? Have you made any change in the makefile?

Highlighted

Re: Toolkit Asynchronous Application Configuration

Hi Tomas ,

I have added additional includes & now the previous problem solved but new issues created.

simple_async.cpp contains below error symbols.

Error1error LNK2019: unresolved external symbol ProTestCallReport referenced in function mainC:\TOOLKIT DEVELOPMENT\SIMPLE ASYNC\SIMPLE ASYNC\DFT\make_install\simple_async.objSimpleAsync
Error2error LNK2019: unresolved external symbol user_initialize referenced in function user_initialize_plusC:\TOOLKIT DEVELOPMENT\SIMPLE ASYNC\SIMPLE ASYNC\DFT\make_install\protk_dllmd.lib(pdp_pdevtk.obj)SimpleAsync
Error2error LNK2019: unresolved external symbol user_initialize referenced in function user_initialize_plusC:\TOOLKIT DEVELOPMENT\SIMPLE ASYNC\SIMPLE ASYNC\DFT\make_install\protk_dllmd.lib(pdp_pdevtk.obj)SimpleAsync

MAKE FILE :

# File Name

MAKEFILENAME = make_SimpleAsync

# Machine Type

PRO_MACHINE_TYPE = x86e_win64

# Executable names

EXE = SimpleAsync.exe

EXE_DLL = SimpleAsync.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)

# 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

CFLAGS = $(CCFLAGS) $(INCS) $(MACH)

# Libraries

PTCLIBS = $(PROTOOL_SYS)/obj/protoolkit.lib

PTCLIBS_DLL = $(PROTOOL_SYS)/obj/protk_dll.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 = simple_async.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

PATH_SOURCE = C:\TOOLKI~1\SIMPLE~1\SIMPLE~1\DFT\MAKE_I~1

simple_async.obj: $(PATH_SOURCE)/simple_async.c

  $(CC) $(CFLAGS) $(PATH_SOURCE)/simple_async.c

PROTK_INST = $(PROTOOL_SRC)/protk_appls/pt_install_test/pt_install_src

PROTK_UTILS = $(PROTOOL_SRC)/protk_appls/pt_examples/pt_utils

TestError.obj: $(PROTK_UTILS)/TestError.c

  $(CC) $(CFLAGS) $(PROTK_UTILS)/TestError.c

UtilString.obj: $(PROTK_UTILS)/UtilString.c

  $(CC) $(CFLAGS) $(PROTK_UTILS)/UtilString.c

clean :

  del $(OBJS)

  del $(EXE)

  nmake -f $(MAKEFILENAME)

clean_dll :

  del $(OBJS)

  del $(EXE_DLL)

  nmake -f $(MAKEFILENAME) dll

Highlighted

Re: Toolkit Asynchronous Application Configuration

You have to check the linker problems - maybe some path is not set correctly or some file is missing...

I just simply created following .bat file for compilation in the make files folder (creoinstaldir)/protoolkit/x86e_win64/obj

call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86_amd64

"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\nmake" /f make_simple_async

pause

and when I run it, it is compiled without problems. I have still 32 bit machine...
This is the output from the compilation I expected you will send me:

-------------------------------------------

C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86_amd64

Setting environment for using Microsoft Visual Studio 2010 x64 cross tools.

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01

Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -c -GS -fp:precise -D_WSTDIO_DEFINED  -I.  -I../../../protoolkit/prot

k_appls/includes -I../../../protoolkit/includes  -I../../../protoolkit/includes

-I../../../protoolkit/protk_appls//includes -DPRO_MACHINE=36 -DPRO_OS=4 ../../.

./protoolkit/protk_appls//pt_simple_async/pt_sasync_src/pt_sasync_src.c

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64

Copyright (C) Microsoft Corporation.  All rights reserved.

pt_sasync_src.c

        cl -c -GS -fp:precise -D_WSTDIO_DEFINED  -I.  -I../../../protoolkit/prot

k_appls/includes -I../../../protoolkit/includes  -I../../../protoolkit/includes

-I../../../protoolkit/protk_appls//includes -DPRO_MACHINE=36 -DPRO_OS=4 ../../.

./protoolkit/protk_appls/pt_examples/pt_utils/pt_utils.c

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64

Copyright (C) Microsoft Corporation.  All rights reserved.

pt_utils.c

Start at `date`

PROTOOL_SRC = ../../../protoolkit

PROTOOL_SYS = ../../../protoolkit/x86e_win64

        link -out:pt_simple_async.exe /subsystem:console /debug:none /machine:am

d64 pt_sasync_src.obj pt_utils.obj ../../../protoolkit/x86e_win64/obj/protoolkit

.lib libcmt.lib kernel32.lib user32.lib wsock32.lib advapi32.lib mpr.lib winspoo

l.lib netapi32.lib psapi.lib gdi32.lib shell32.lib comdlg32.lib ole32.lib ws2_32

.lib

Microsoft (R) Incremental Linker Version 10.00.40219.01

Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library pt_simple_async.lib and object pt_simple_async.exp

Finished at `date`

        del pt_sasync_src.obj pt_utils.obj

Press any key to continue . . .

Highlighted

Re: Toolkit Asynchronous Application Configuration

The Problem is Solved,

I missed pt_asynchronous.lib in the Linker

View solution in original post

Announcements