Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Pro/Toolkit link error: “unresolved external symbol ProDimensionBaselineDirectionGet” — which library to link, and how to map APIs to libs?
Questions:
I think your issue is lack of an include statement. To determine what to include, search the function in the TKWizard, The Synopsis portion tells you which .h file that you need to include. In this case #include <ProDimension.h>
| Description | ||
| Get the direction of an ordinate baseline dimension in the case where this is not implied by the attachment reference as retrieved by ProDimensionAttachmentsGet. | ||
| Synopsis | ||
| #include <ProDimension.h> | ||
| ProError | ProDimensionBaselinedirectionGet | ( |
| ProVector dir_vec | ||
| /* (Out) | ||
| the direction vector for this baseline. | ||
| */ | ||
| ) |
Thanks for your reply @msteffke
I already have that
| #include <ProDimension.h> |
| ProError |
in my header
Headers included in my code :
#include "CREO TOOLKIT CHECK.h"
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <cctype>
#include <ProMdl.h>
#include <ProSolid.h>
#include <ProToolkit.h>
#include "ProMenu.h"
#include <ProDrawing.h>
#include <ProDimension.h>
#include <ProUtil.h>
#include "ProArray.h"
#include "ProFeatType.h"
#include <ProMessage.h>
#include "ProFeature.h"
#include <ProCore.h>
#include <ProModelitem.h>
#include <ProSelection.h>
#include <tuple>
Try to rename, for me you should call ProDimensionBaselinedirectionGet with a lower ‘d’ 😎
Thank you for your reply!!
Sorry i wrote with 'd' in my code and mistakenly used 'D' in the above question,
So getting the same error even after using 'd'.
What about protk_dll_NU.lib ?
# 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
Thanks for your reply!!
Adding protk_dll_NU.lib can resolve the issue, as protk_dll_NU.lib is the dll library that contains ProDimensionBaselinedirectionGet api
but Adding both protk_dll_NU.lib and protoolkit_NU.lib causing LINK "already defined" issue as both libraries contains definitions for many APIs
Adding both libraries is not possible in standalone EXE model application
If the model is going to be an DLL means this will work.
Is there any ways to tackle this or should i use the program as DLL only?
Hi,
I am just sending link to help page.
In the early days spawn mode was the only mode to develop your own extension, But now , a DLL is what you should have. A DLL runs like other DLLs and share as much as possible to have a better performance.
I don’t use an IDE, but check to add a flag to nmake, then a DLL creation is an option.
Don,t forget, a DLL can be loaded on the fly in other executables, just in case you need it in asynchrone modes.
