question

Tom S4 avatar image
1 Like"
Tom S4 asked Jordan Johnson commented

ProcessFlow Module SDK help

I'm trying my hand at a "Hello World"-ish ProcessFlow module. This is to create a new PF delay that multiplies the delay by 1000. I was successful in using the examples provided for vanilla FlexSim, but haven't been able to get anything to work for a ProcessFlow add-on yet.

I am getting a ton of errors when compiling - I think this is the primary error:

C:\Users\<user>\Desktop\FlexSimDev\FlexSim 2023\modules\MyDelayModule\ModuleDLL\flexsimcontent\processflow\ProcessFlowObject.h(19,1): warning C4275: non dll-interface class 'FlexSim::ObjectDataType' used as base for dll-interface class 'ProcessFlow::ProcessFlowObject'


I got the FlexSim header files and DLLMain.cpp from "/program/system/include",

the FlexSim .lib file from "/program/system/lib",

the ProcessFlow .lib and header files "/modules/ProcessFlow/include".

and my files are:

// MyDelay.h \\
#pragma once
#include "FlexsimDefs.h"
#include "Delay.h"

namespace ProcessFlow
{
class MyDelay : public Delay {
virtual void bindVariables() override;
virtual double getDelayTime(Token* token) override;
};
}
// MyDelay.cpp \\
#include "MyDelay.h"
#include "Delay.h"

namespace ProcessFlow
{
    void MyDelay::bindVariables()
    {
        __super::bindVariables();
    }

    double MyDelay::getDelayTime(Token* token)
    {
        return 1000 * Delay::getDelayTime(token);
    }
}
// module.h \\
#pragma once

#include "FlexsimDefs.h"
#include "allobjects.h"
// module.cpp \\
#include "module.h"
#include "MyDelay.h"

visible ObjectDataType* createodtderivative(char* classname)
{
if (strcmp(classname, "MyDelay") == 0) {
return new ProcessFlow::MyDelay();
}
return NULL;
}

visible SimpleDataType* createsdtderivative(char* classname)
{
return NULL;
}

visible void dllinitialize()
{

}

visible void dllcleanup()
{

}

Thank you.

FlexSim 23.0.1
processflowmodule sdkdll error
· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

@Tom S4

Here is a working sample module that you can use as a reference. Just unzip it and place the MyModule folder in the modules folder of FlexSim 2023. You should see a MyDelay activity in the library that you can drag out.

MyModule.zip

1673978146124.png


1 Like 1 ·
1673978146124.png (7.5 KiB)
mymodule.zip (3.9 MiB)
Tom S4 avatar image Tom S4 Matthew Gillespie ♦♦ commented ·
Awesome! This is great, thanks for this. Is there detailed SDK method documentation for ProcessFlow somewhere? For example, how would I know to use 'onBlockingStart' or why would I use it instead of 'getDelayTime'? What is 'holder' on the Delay and on the Token? How would I know that the delay time and and event ref are stored on the token, not the delay?


This is a perfect example - just want to see if there is more information somewhere or if is mostly going to be exploring the header files.

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Tom S4 commented ·
We have very low documentation on the Process Flow module SDK. You are welcome to post these as new questions on the forum, though. Here's some quick answers (which I'm happy to post again as answers to a new question):
  • The "holder" member refers to the node that own the class data. Somewhere in the tree you can find a node for the activity and a node for the token. "holder" refers to that node.
  • A Delay activity is a "Blocking" activity. Most activities are blocking; it means the token will possible not immediately flow to the next activity. An AssignLabels is not a blocking activity, but things like "Delay" are.
  • As far as where data is stored, activity configuration is stored on the activity, but per-token data is generally stored on the token. There are five available slots for this kind of data in the tokens "data" member. You can use any slot that a parent class has not used. To find those, look for use of "data[1]". You can see that we use macros to name the slot within each activity.
1 Like 1 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·
I haven't tried running the code, but I didn't see anything wrong on first glance. The message you shared is a warning, but would not prevent you from compiling. Can you share any messages in the output console that contain the word "error"?
0 Likes 0 ·
Tom S4 avatar image Tom S4 Jordan Johnson ♦♦ commented ·

Sure thing. Here are the errors:

1>   Creating library C:\Users\<user>\Desktop\FlexSimDev\FlexSim 2023\modules\MyDelayModule\ModuleDLL\..\MyDelayModule.lib and object C:\Users\<user>\Desktop\FlexSimDev\FlexSim 2023\modules\MyDelayModule\ModuleDLL\..\MyDelayModule.exp
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl ProcessFlow::ProcessBlock::getClassName(void)" (__imp_?getClassName@ProcessBlock@ProcessFlow@@UEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::ProcessBlock::findLabel(char const *,int)" (__imp_?findLabel@ProcessBlock@ProcessFlow@@UEAA_NPEBDH@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::ProcessBlock::findText(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int)" (__imp_?findText@ProcessBlock@ProcessFlow@@UEAA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::ProcessBlock::testAssignToNode(class FlexSim::TreeNode *)" (__imp_?testAssignToNode@ProcessBlock@ProcessFlow@@UEAA_NPEAVTreeNode@FlexSim@@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual char const * __cdecl ProcessFlow::ProcessBlock::getTitle(void)" (__imp_?getTitle@ProcessBlock@ProcessFlow@@UEAAPEBDXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual double __cdecl ProcessFlow::ProcessBlock::onStartSimulation(void)" (__imp_?onStartSimulation@ProcessBlock@ProcessFlow@@UEAANXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __cdecl ProcessFlow::ProcessBlock::instanceEnumerator(class FlexSim::TreeNode *,class FlexSim::Variant const &,class FlexSim::Variant const &)" (__imp_?instanceEnumerator@ProcessBlock@ProcessFlow@@UEAAHPEAVTreeNode@FlexSim@@AEBVVariant@4@1@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class FlexSim::TreeNode * __cdecl ProcessFlow::ProcessBlock::instanceResolver(class FlexSim::Variant const &)" (__imp_?instanceResolver@ProcessBlock@ProcessFlow@@UEAAPEAVTreeNode@FlexSim@@AEBVVariant@4@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual double __cdecl ProcessFlow::ProcessBlock::getStatistic(class FlexSim::Variant const &,class FlexSim::Variant const &,class FlexSim::Variant const &,class FlexSim::Variant const &,int)" (__imp_?getStatistic@ProcessBlock@ProcessFlow@@UEAANAEBVVariant@FlexSim@@000H@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::BlockingActivity::updateBlockingStatsOnExit(class ProcessFlow::Instance *,class ProcessFlow::Token &,bool)" (__imp_?updateBlockingStatsOnExit@BlockingActivity@ProcessFlow@@UEAAXPEAVInstance@2@AEAVToken@2@_N@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::BlockingActivity::onFinish(class ProcessFlow::Instance *,class ProcessFlow::Token &)" (__imp_?onFinish@BlockingActivity@ProcessFlow@@UEAAXPEAVInstance@2@AEAVToken@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::BlockingActivity::updateBlockingStatsOnEntry(class ProcessFlow::Instance *,class ProcessFlow::Token &,bool)" (__imp_?updateBlockingStatsOnEntry@BlockingActivity@ProcessFlow@@UEAAXPEAVInstance@2@AEAVToken@2@_N@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::BlockingActivity::onStart(class ProcessFlow::Instance *,class ProcessFlow::Token &)" (__imp_?onStart@BlockingActivity@ProcessFlow@@UEAAXPEAVInstance@2@AEAVToken@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ProcessBlockInstance * __cdecl ProcessFlow::BlockingActivity::instanceFactory(void)" (__imp_?instanceFactory@BlockingActivity@ProcessFlow@@UEAAPEAVProcessBlockInstance@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::BlockingActivity::bindEvents(void)" (__imp_?bindEvents@BlockingActivity@ProcessFlow@@UEAAXXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::BlockingActivity::bindStatistics(void)" (__imp_?bindStatistics@BlockingActivity@ProcessFlow@@UEAAXXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class std::vector<class FlexSim::TreeNode *,class std::allocator<class FlexSim::TreeNode *> > __cdecl ProcessFlow::Delay::getCodeNodes(bool)" (__imp_?getCodeNodes@Delay@ProcessFlow@@UEAA?AV?$vector@PEAVTreeNode@FlexSim@@V?$allocator@PEAVTreeNode@FlexSim@@@std@@@std@@_N@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ProcessBlockView * __cdecl ProcessFlow::Delay::createBlockView(class std::shared_ptr<class ProcessFlow::ModelView> &)" (__imp_?createBlockView@Delay@ProcessFlow@@UEAAPEAVProcessBlockView@2@AEAV?$shared_ptr@VModelView@ProcessFlow@@@std@@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Delay::restoreTokenContext(class ProcessFlow::Token &,class ProcessFlow::TokenContext *)" (__imp_?restoreTokenContext@Delay@ProcessFlow@@UEAAXAEAVToken@2@PEAVTokenContext@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::TokenContext * __cdecl ProcessFlow::Delay::saveTokenContext(class ProcessFlow::Token &,class FlexSim::TreeNode *)" (__imp_?saveTokenContext@Delay@ProcessFlow@@UEAAPEAVTokenContext@2@AEAVToken@2@PEAVTreeNode@FlexSim@@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual double __cdecl ProcessFlow::Delay::getEntryTime(class ProcessFlow::Token *)" (__imp_?getEntryTime@Delay@ProcessFlow@@UEAANPEAVToken@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Delay::releaseToken(class ProcessFlow::Token &,class FlexSim::Variant const &)" (__imp_?releaseToken@Delay@ProcessFlow@@UEAA_NAEAVToken@2@AEBVVariant@FlexSim@@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Delay::onTimerEvent(class ProcessFlow::TimerEvent *)" (__imp_?onTimerEvent@Delay@ProcessFlow@@UEAAXPEAVTimerEvent@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Delay::onBlockingStart(class ProcessFlow::Instance *,class ProcessFlow::Token &)" (__imp_?onBlockingStart@Delay@ProcessFlow@@UEAAXPEAVInstance@2@AEAVToken@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Delay::addTokenWithoutStart(class ProcessFlow::Instance *,class ProcessFlow::Token &)" (__imp_?addTokenWithoutStart@Delay@ProcessFlow@@UEAAXPEAVInstance@2@AEAVToken@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class FlexSim::TreeNode * __cdecl ProcessFlow::ProcessFlowObject::addConnectorOut(class ProcessFlow::Connector *)" (__imp_?addConnectorOut@ProcessFlowObject@ProcessFlow@@UEAAPEAVTreeNode@FlexSim@@PEAVConnector@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ProcessFlow * __cdecl ProcessFlow::ProcessFlowObject::getModel(void)" (__imp_?getModel@ProcessFlowObject@ProcessFlow@@UEAAPEAV22@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::ProcessFlowObject::resize(class FlexSim::VecGeneric<double,2> const &,class FlexSim::VecGeneric<double,2> const &)" (__imp_?resize@ProcessFlowObject@ProcessFlow@@UEAAXAEBV?$VecGeneric@N$01@FlexSim@@0@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::ProcessFlowObject::move(class FlexSim::VecGeneric<double,2> &,enum ProcessFlow::ProcessFlowObject::MoveReason)" (__imp_?move@ProcessFlowObject@ProcessFlow@@UEAA_NAEAV?$VecGeneric@N$01@FlexSim@@W4MoveReason@12@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class FlexSim::TreeNode * __cdecl ProcessFlow::ProcessFlowObject::getEventInfoObject(char const *)" (__imp_?getEventInfoObject@ProcessFlowObject@ProcessFlow@@UEAAPEAVTreeNode@FlexSim@@PEBD@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class FlexSim::FlexSimArray<class FlexSim::Variant,4> __cdecl ProcessFlow::Activity::getTokensAsArray(class ProcessFlow::Instance &,int)" (__imp_?getTokensAsArray@Activity@ProcessFlow@@UEAA?AV?$FlexSimArray@VVariant@FlexSim@@$03@FlexSim@@AEAVInstance@2@H@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Activity::updateContainer(void)" (__imp_?updateContainer@Activity@ProcessFlow@@UEAA_NXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Activity::isSurroundedBy(class ProcessFlow::ProcessFlowObject *)" (__imp_?isSurroundedBy@Activity@ProcessFlow@@UEAA_NPEAVProcessFlowObject@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual struct std::pair<int,class ProcessFlow::Token * *> __cdecl ProcessFlow::Activity::getTracedTokens(class ProcessFlow::Instance *)" (__imp_?getTracedTokens@Activity@ProcessFlow@@UEAA?AU?$pair@HPEAPEAVToken@ProcessFlow@@@std@@PEAVInstance@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::getTokens(class ProcessFlow::Instance *,class ProcessFlow::TokenViewList &)" (__imp_?getTokens@Activity@ProcessFlow@@UEAAXPEAVInstance@2@AEAVTokenViewList@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Token * __cdecl ProcessFlow::Activity::getToken(class ProcessFlow::Instance *,int)" (__imp_?getToken@Activity@ProcessFlow@@UEAAPEAVToken@2@PEAVInstance@2@H@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual unsigned int __cdecl ProcessFlow::Activity::getTokenCount(class ProcessFlow::Instance *)" (__imp_?getTokenCount@Activity@ProcessFlow@@UEAAIPEAVInstance@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::updateTheme(class FlexSim::TreeNode *)" (__imp_?updateTheme@Activity@ProcessFlow@@UEAAXPEAVTreeNode@FlexSim@@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::makeViewsDirty(void)" (__imp_?makeViewsDirty@Activity@ProcessFlow@@UEAAXXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual unsigned __int64 __cdecl ProcessFlow::Activity::dumpTokens(class FlexSim::TreeNode *,class FlexSim::TreeNode *,class FlexSim::TreeNode *)" (__imp_?dumpTokens@Activity@ProcessFlow@@UEAA_KPEAVTreeNode@FlexSim@@00@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Activity::hasConnection(void)" (__imp_?hasConnection@Activity@ProcessFlow@@UEAA_NXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::fireEventsOnFinish(class ProcessFlow::Instance *,class ProcessFlow::ActivityInstance *,class ProcessFlow::Token &,class FlexSim::Variant const &)" (__imp_?fireEventsOnFinish@Activity@ProcessFlow@@UEAAXPEAVInstance@2@PEAVActivityInstance@2@AEAVToken@2@AEBVVariant@FlexSim@@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::updateStatsOnFinish(class ProcessFlow::Instance *,class ProcessFlow::ActivityInstance *,class ProcessFlow::Token &)" (__imp_?updateStatsOnFinish@Activity@ProcessFlow@@UEAAXPEAVInstance@2@PEAVActivityInstance@2@AEAVToken@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::onDelete(void)" (__imp_?onDelete@Activity@ProcessFlow@@UEAAXXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::snapTo(class ProcessFlow::ProcessFlowObject *,class ProcessFlow::ModelView *)" (__imp_?snapTo@Activity@ProcessFlow@@UEAAXPEAVProcessFlowObject@2@PEAVModelView@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class FlexSimPainter::Rect __cdecl ProcessFlow::Activity::getRect(void)" (__imp_?getRect@Activity@ProcessFlow@@UEAA?AVRect@FlexSimPainter@@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual float __cdecl ProcessFlow::Activity::getHeight(void)" (__imp_?getHeight@Activity@ProcessFlow@@UEAAMXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual float __cdecl ProcessFlow::Activity::getRatio(void)" (__imp_?getRatio@Activity@ProcessFlow@@UEAAMXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::onReset(class ProcessFlow::Instance *)" (__imp_?onReset@Activity@ProcessFlow@@UEAAXPEAVInstance@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Activity::bind(void)" (__imp_?bind@Activity@ProcessFlow@@UEAAXXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl ProcessFlow::Delay::~Delay(void)" (__imp_??1Delay@ProcessFlow@@UEAA@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl ProcessFlow::Delay::Delay(void)" (__imp_??0Delay@ProcessFlow@@QEAA@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Delay * __cdecl ProcessFlow::Delay::toDelay(void)" (__imp_?toDelay@Delay@ProcessFlow@@UEAAPEAV12@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual char const * __cdecl ProcessFlow::Delay::getIconName(void)" (__imp_?getIconName@Delay@ProcessFlow@@UEAAPEBDXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::BlockingActivity * __cdecl ProcessFlow::BlockingActivity::toBlockingActivity(void)" (__imp_?toBlockingActivity@BlockingActivity@ProcessFlow@@UEAAPEAV12@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::BlockingActivity::onBlockingFinish(class ProcessFlow::Instance *,class ProcessFlow::Token &)" (__imp_?onBlockingFinish@BlockingActivity@ProcessFlow@@UEAAXPEAVInstance@2@AEAVToken@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::RunSubFlow * __cdecl ProcessFlow::Activity::toRunSubFlow(void)" (__imp_?toRunSubFlow@Activity@ProcessFlow@@UEAAPEAVRunSubFlow@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Activity * __cdecl ProcessFlow::Activity::toActivity(void)" (__imp_?toActivity@Activity@ProcessFlow@@UEAAPEAV12@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Activity::canMakeConnectionsOut(void)" (__imp_?canMakeConnectionsOut@Activity@ProcessFlow@@UEAA_NXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Activity::canMakeConnections(void)" (__imp_?canMakeConnections@Activity@ProcessFlow@@UEAA_NXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Activity::canSnapTo(class ProcessFlow::ProcessFlowObject *)" (__imp_?canSnapTo@Activity@ProcessFlow@@UEAA_NPEAVProcessFlowObject@2@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::Activity::canSnap(void)" (__imp_?canSnap@Activity@ProcessFlow@@UEAA_NXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::ProcessBlock::isBlockClass(char const *)" (__imp_?isBlockClass@ProcessBlock@ProcessFlow@@UEAA_NPEBD@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ProcessBlock * __cdecl ProcessFlow::ProcessBlock::toBlock(void)" (__imp_?toBlock@ProcessBlock@ProcessFlow@@UEAAPEAV12@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::ProcessBlock::setLinkProperties(class FlexSim::TreeNode *)" (__imp_?setLinkProperties@ProcessBlock@ProcessFlow@@UEAAXPEAVTreeNode@FlexSim@@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class FlexSim::TreeNode * __cdecl ProcessFlow::ProcessBlock::linkedTo(int)" (__imp_?linkedTo@ProcessBlock@ProcessFlow@@UEAAPEAVTreeNode@FlexSim@@H@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual enum ProcessFlow::LinkType __cdecl ProcessFlow::ProcessBlock::getLinkType(int)" (__imp_?getLinkType@ProcessBlock@ProcessFlow@@UEAA?AW4LinkType@2@H@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __cdecl ProcessFlow::ProcessBlock::getLinkCount(void)" (__imp_?getLinkCount@ProcessBlock@ProcessFlow@@UEAAHXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::ProcessBlock::refreshLabels(bool)" (__imp_?refreshLabels@ProcessBlock@ProcessFlow@@UEAA_N_N@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::ProcessBlock::updateName(char const *)" (__imp_?updateName@ProcessBlock@ProcessFlow@@UEAAXPEBD@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::ProcessBlock::updateFromBlock(class ProcessFlow::ProcessBlock *)" (__imp_?updateFromBlock@ProcessBlock@ProcessFlow@@UEAAXPEAV12@@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl ProcessFlow::ProcessFlowObject::shouldShowInConnectorRanks(void)" (__imp_?shouldShowInConnectorRanks@ProcessFlowObject@ProcessFlow@@UEAA_NXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::ProcessFlowObject::onChangeLocationUndo(void)" (__imp_?onChangeLocationUndo@ProcessFlowObject@ProcessFlow@@UEAAXXZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::FindItem * __cdecl ProcessFlow::ProcessFlowObject::toFindItem(void)" (__imp_?toFindItem@ProcessFlowObject@ProcessFlow@@UEAAPEAVFindItem@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::FindSlot * __cdecl ProcessFlow::ProcessFlowObject::toFindSlot(void)" (__imp_?toFindSlot@ProcessFlowObject@ProcessFlow@@UEAAPEAVFindSlot@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Zone * __cdecl ProcessFlow::ProcessFlowObject::toZone(void)" (__imp_?toZone@ProcessFlowObject@ProcessFlow@@UEAAPEAVZone@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::WaitForEvent * __cdecl ProcessFlow::ProcessFlowObject::toWaitForEvent(void)" (__imp_?toWaitForEvent@ProcessFlowObject@ProcessFlow@@UEAAPEAVWaitForEvent@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Variable * __cdecl ProcessFlow::ProcessFlowObject::toVariable(void)" (__imp_?toVariable@ProcessFlowObject@ProcessFlow@@UEAAPEAVVariable@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::TETask * __cdecl ProcessFlow::ProcessFlowObject::toTETask(void)" (__imp_?toTETask@ProcessFlowObject@ProcessFlow@@UEAAPEAVTETask@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Text * __cdecl ProcessFlow::ProcessFlowObject::toText(void)" (__imp_?toText@ProcessFlowObject@ProcessFlow@@UEAAPEAVText@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Synchronize * __cdecl ProcessFlow::ProcessFlowObject::toSynchronize(void)" (__imp_?toSynchronize@ProcessFlowObject@ProcessFlow@@UEAAPEAVSynchronize@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Split * __cdecl ProcessFlow::ProcessFlowObject::toSplit(void)" (__imp_?toSplit@ProcessFlowObject@ProcessFlow@@UEAAPEAVSplit@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Start * __cdecl ProcessFlow::ProcessFlowObject::toStart(void)" (__imp_?toStart@ProcessFlowObject@ProcessFlow@@UEAAPEAVStart@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Shape * __cdecl ProcessFlow::ProcessFlowObject::toShape(void)" (__imp_?toShape@ProcessFlowObject@ProcessFlow@@UEAAPEAVShape@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::SetVariable * __cdecl ProcessFlow::ProcessFlowObject::toSetVariable(void)" (__imp_?toSetVariable@ProcessFlowObject@ProcessFlow@@UEAAPEAVSetVariable@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ScheduleSource * __cdecl ProcessFlow::ProcessFlowObject::toScheduleSource(void)" (__imp_?toScheduleSource@ProcessFlowObject@ProcessFlow@@UEAAPEAVScheduleSource@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::SaveContext * __cdecl ProcessFlow::ProcessFlowObject::toSaveContext(void)" (__imp_?toSaveContext@ProcessFlowObject@ProcessFlow@@UEAAPEAVSaveContext@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::RestoreContext * __cdecl ProcessFlow::ProcessFlowObject::toRestoreContext(void)" (__imp_?toRestoreContext@ProcessFlowObject@ProcessFlow@@UEAAPEAVRestoreContext@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Resource * __cdecl ProcessFlow::ProcessFlowObject::toResource(void)" (__imp_?toResource@ProcessFlowObject@ProcessFlow@@UEAAPEAVResource@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ResourceBlock * __cdecl ProcessFlow::ProcessFlowObject::toResourceBlock(void)" (__imp_?toResourceBlock@ProcessFlowObject@ProcessFlow@@UEAAPEAVResourceBlock@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ReleaseToken * __cdecl ProcessFlow::ProcessFlowObject::toReleaseToken(void)" (__imp_?toReleaseToken@ProcessFlowObject@ProcessFlow@@UEAAPEAVReleaseToken@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::PushToList * __cdecl ProcessFlow::ProcessFlowObject::toPushToList(void)" (__imp_?toPushToList@ProcessFlowObject@ProcessFlow@@UEAAPEAVPushToList@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::PullFromList * __cdecl ProcessFlow::ProcessFlowObject::toPullFromList(void)" (__imp_?toPullFromList@ProcessFlowObject@ProcessFlow@@UEAAPEAVPullFromList@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::MoveObject * __cdecl ProcessFlow::ProcessFlowObject::toMoveObject(void)" (__imp_?toMoveObject@ProcessFlowObject@ProcessFlow@@UEAAPEAVMoveObject@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::List * __cdecl ProcessFlow::ProcessFlowObject::toList(void)" (__imp_?toList@ProcessFlowObject@ProcessFlow@@UEAAPEAVList@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Image * __cdecl ProcessFlow::ProcessFlowObject::toImage(void)" (__imp_?toImage@ProcessFlowObject@ProcessFlow@@UEAAPEAVImage@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::GetVariable * __cdecl ProcessFlow::ProcessFlowObject::toGetVariable(void)" (__imp_?toGetVariable@ProcessFlowObject@ProcessFlow@@UEAAPEAVGetVariable@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::GetKinematics * __cdecl ProcessFlow::ProcessFlowObject::toGetKinematics(void)" (__imp_?toGetKinematics@ProcessFlowObject@ProcessFlow@@UEAAPEAVGetKinematics@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::FinishKinematics * __cdecl ProcessFlow::ProcessFlowObject::toFinishKinematics(void)" (__imp_?toFinishKinematics@ProcessFlowObject@ProcessFlow@@UEAAPEAVFinishKinematics@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Finish * __cdecl ProcessFlow::ProcessFlowObject::toFinish(void)" (__imp_?toFinish@ProcessFlowObject@ProcessFlow@@UEAAPEAVFinish@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ExitZone * __cdecl ProcessFlow::ProcessFlowObject::toExitZone(void)" (__imp_?toExitZone@ProcessFlowObject@ProcessFlow@@UEAAPEAVExitZone@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::EnterZone * __cdecl ProcessFlow::ProcessFlowObject::toEnterZone(void)" (__imp_?toEnterZone@ProcessFlowObject@ProcessFlow@@UEAAPEAVEnterZone@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::EventTriggeredSource * __cdecl ProcessFlow::ProcessFlowObject::toEventTriggeredSource(void)" (__imp_?toEventTriggeredSource@ProcessFlowObject@ProcessFlow@@UEAAPEAVEventTriggeredSource@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ProcessDisplay * __cdecl ProcessFlow::ProcessFlowObject::toDisplay(void)" (__imp_?toDisplay@ProcessFlowObject@ProcessFlow@@UEAAPEAVProcessDisplay@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::DateTimeSource * __cdecl ProcessFlow::ProcessFlowObject::toDateTimeSource(void)" (__imp_?toDateTimeSource@ProcessFlowObject@ProcessFlow@@UEAAPEAVDateTimeSource@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::CreateTS * __cdecl ProcessFlow::ProcessFlowObject::toCreateTS(void)" (__imp_?toCreateTS@ProcessFlowObject@ProcessFlow@@UEAAPEAVCreateTS@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::CreateObject * __cdecl ProcessFlow::ProcessFlowObject::toCreateObject(void)" (__imp_?toCreateObject@ProcessFlowObject@ProcessFlow@@UEAAPEAVCreateObject@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::CreateKinematics * __cdecl ProcessFlow::ProcessFlowObject::toCreateKinematics(void)" (__imp_?toCreateKinematics@ProcessFlowObject@ProcessFlow@@UEAAPEAVCreateKinematics@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Container * __cdecl ProcessFlow::ProcessFlowObject::toContainer(void)" (__imp_?toContainer@ProcessFlowObject@ProcessFlow@@UEAAPEAVContainer@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Batch * __cdecl ProcessFlow::ProcessFlowObject::toBatch(void)" (__imp_?toBatch@ProcessFlowObject@ProcessFlow@@UEAAPEAVBatch@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::ApplyKinematics * __cdecl ProcessFlow::ProcessFlowObject::toApplyKinematics(void)" (__imp_?toApplyKinematics@ProcessFlowObject@ProcessFlow@@UEAAPEAVApplyKinematics@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Acquire * __cdecl ProcessFlow::ProcessFlowObject::toAcquire(void)" (__imp_?toAcquire@ProcessFlowObject@ProcessFlow@@UEAAPEAVAcquire@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class ProcessFlow::Arrow * __cdecl ProcessFlow::ProcessFlowObject::toArrow(void)" (__imp_?toArrow@ProcessFlowObject@ProcessFlow@@UEAAPEAVArrow@2@XZ)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class FlexSim::FlexSimArray<class FlexSim::Variant,4> __cdecl ProcessFlow::ProcessFlowObject::getCodeNodesArray(bool)" (__imp_?getCodeNodesArray@ProcessFlowObject@ProcessFlow@@UEAA?AV?$FlexSimArray@VVariant@FlexSim@@$03@FlexSim@@_N@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::ProcessFlowObject::resolveOutVector(struct ProcessFlow::BlockOutlineLoc const &,class FlexSim::VecGeneric<double,2> &,class FlexSim::VecGeneric<double,2> &)" (__imp_?resolveOutVector@ProcessFlowObject@ProcessFlow@@UEAAXAEBUBlockOutlineLoc@2@AEAV?$VecGeneric@N$01@FlexSim@@1@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual struct ProcessFlow::BlockOutlineLoc __cdecl ProcessFlow::ProcessFlowObject::resolveOutlineLoc(float,float)" (__imp_?resolveOutlineLoc@ProcessFlowObject@ProcessFlow@@UEAA?AUBlockOutlineLoc@2@MM@Z)
1>module.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::ProcessFlowObject::onCreate(void)" (__imp_?onCreate@ProcessFlowObject@ProcessFlow@@UEAAXXZ)
1>MyDelay.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual double __cdecl ProcessFlow::Delay::getDelayTime(class ProcessFlow::Token *)" (__imp_?getDelayTime@Delay@ProcessFlow@@UEAANPEAVToken@2@@Z)
1>MyDelay.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl ProcessFlow::Delay::bindVariables(void)" (__imp_?bindVariables@Delay@ProcessFlow@@UEAAXXZ)
1>C:\Users\<user>\Desktop\FlexSimDev\FlexSim 2023\modules\MyDelayModule\ModuleDLL\..\MyDelayModule.dll : fatal error LNK1120: 119 unresolved externals
0 Likes 0 ·

1 Answer

Jordan Johnson avatar image
2 Likes"
Jordan Johnson answered Tom S4 commented

If you are using the default module SDK, then that SDK doesn't link ProcessFlow.lib.

For people new to C++ development: one way to share code is by creating header files that define an API (what you want your code to do). You can implement that API (the secrets of how your code does what it does) in cpp files, and compile those into a .lib or .dll object. You can then share your header files and .lib files. For other people to use this code in their projects, they need to include the header files and link the .lib file.

For this question: these (the errors you shared in the comments of the original question) are linker errors. Basically, you have included the header files, so that all the symbols (e.g. function/class names) are recognized, but you haven't linked the library. Take the last error, which essentially says "you are trying to call ProcessFlow::Delay::bindVariables(), but I can't find a definition for that function anywhere." The answer is to link ProcessFlow.lib in your project.

To fix this error, you just have to add ProcessFlow.lib to your additional dependencies in your project's properties, under Linker/Input:

1673974047807.png

Note that I copied the process flow headers/lib into a folder called pfcontent, next to the flexsimcontent folder. If your paths are different, you may need to adjust the include.


1673974047807.png (38.8 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Tom S4 avatar image Tom S4 commented ·
Ah...this makes sense, thanks. C++ error messages go right over my head - I miss my high level languages.
0 Likes 0 ·