I create a symbol linked to a DLL.
but got a fatal error.
// Automatically generated C++ file on Sun Dec 15 13:31:11 2024
//
// To build with Digital Mars C++ Compiler:
//
// dmc -mn -WD fuse.cpp kernel32.lib
union uData
{
bool b;
char c;
unsigned char uc;
short s;
unsigned short us;
int i;
unsigned int ui;
float f;
double d;
long long int i64;
unsigned long long int ui64;
char *str;
unsigned char *bytes;
};
// int DllMain() must exist and return 1 for a process to load the .DLL
// See DllMain entry point (Process.h) - Win32 apps | Microsoft Learn for more information.
int __stdcall DllMain(void *module, unsigned int reason, void *reserved) { return 1; }
// #undef pin names lest they collide with names in any header file(s) you might include. #undef IN #undef OUT
You didn’t post the schematic so I’m just guessing. There’s a fragile relationship between the DLL file name, the “evaluation function name” within the DLL file, and the schematic component name (the Symbol Properties, 1st String Attribute of the component).
My guess is that you renamed something – either the function name within the DLL or the DLL and schematic component name without renaming the evaluation function/recompiling.
I create everything from scratch and still the same issue.
symbol was called bypass
dll was called bypass
1st Attribute is called bypass bypass.cpp (980 Bytes)
vc x
I believe it may be a bit challenging to troubleshoot your specific issue only with your .cpp file
Your initial post shows the main function named “fuse,” but later it is “bypass.” I am not sure if your first attribute name can match the main function name.
In your symbol screen capture, there is a path in the library file line. There shouldn’t be anything there for a DLL symbol.
In your symbol screen capture, the pin Nets and pin Name do not have “OUT.” I am not sure if you made a mistake when creating this DLL symbol.
Here is a set of files can work if you put them into same directory to run the simulation. I have not modified your .cpp file; I have simply restored everything so that you can run a simulation for it.