-2

my goal is to write a small OPC-UA-Client in Delphi and i want to use the original OPC-UA-Stack without any 3rd-party-SDK.

I am already able to compile the Ansi-C-Stack but the output are .obj and .lib files.

Is there a way to compile the stack to a DLL? I already tried do use link.exe to create a DLL from the Obj-Files but I get a lot of "unresolved external symbol" error messages, some of them i was able to resolve, but not all.

I also tried to use the obj. files directly in delphi, but then i have a lot of manual translation work.

gsamaras
  • 71,951
  • 46
  • 188
  • 305
Mr.Dev
  • 23
  • 3
  • 2
    You need to resolve the missing dependencies – David Heffernan Jun 17 '18 at 10:21
  • So using the link.exe is the correct way to create a DLL? – Mr.Dev Jun 17 '18 at 11:04
  • 1
    @Mr.Dev: How you turn a set of .obj and .lib files into a DLL is dependent on the system you are using (gpp, VC++, C++Builder, etc.). It should be described somewhere in the documentation. But is this really a Delphi question? – Rudy Velthuis Jun 17 '18 at 11:57
  • It was a Delphi question, since the original problem was how to make the stack usable in Delphi. Compiling it as DLL is the first part of the process - and this is not really explained in the project, although it is possible. – Jouni Aro Jun 19 '18 at 09:15

1 Answers1

-1

Yes, you can compile it as a DLL with Visual Studio. In the project Properties, change the Configuration Type to .dll and also add the define '_UA_STACK_BUILD_DLL'.

Jouni Aro
  • 2,099
  • 14
  • 30