Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run OPC DA server with C++ #14

Open
HovoApoyan opened this issue Sep 13, 2022 · 5 comments
Open

Run OPC DA server with C++ #14

HovoApoyan opened this issue Sep 13, 2022 · 5 comments

Comments

@HovoApoyan
Copy link

HovoApoyan commented Sep 13, 2022

I have some questions about the OPC DA server.

  1. Has anyone run the DemoServer with C++, from the samples?

I'm build OPCToolbox_VS2019.sln, get the corresponding .libs for DemoServer, then I try to open DemoServer_VS2017.vcxproj and run it, I'm set the already built files to the project linker (path and dependencies).
image
image

but I get a linker error

image

  1. Has anyone run the other samples, it is possible?
  2. Finally, is this project free or not?
@ro0ter
Copy link

ro0ter commented Sep 14, 2022

Hi there,

Captain here:

  1. Just try to build both TBC and the C++ sample you would like to run with the same Visual Studio version. Your problems will magically disappear ,-)
  2. Everything works. Trust me.
  3. Can't advise you regarding the legal aspects. Please check the licence type and contact the owner.

Regards!

@HovoApoyan
Copy link
Author

Thanks for the feedback,

what do you mean to build both TBC?

I also tried to build OPCToolbox_VS2017.sln (in order to run with the same Visual Studio version), and get this link error.
image

from OPCToolbox_VS2017.sln OTB_VS2017 could not create the OTBD.lib file, and accordingly OPCToolboxC++_VS2017 cannot open the OTBD.lib file. Magically appear new problem ))

@ro0ter
Copy link

ro0ter commented Sep 19, 2022

TBC = OPC ToolKit C++ API (TBC actually means [OPC] ToolBox for C++... the first name of the C++ API)

Please mind the paths.

And yes, both the release and the debug versions of the TBC use the OTBd for importing symbols (debug version).

In order to correctly build the TBC, you would need to first build the TK CORE. The ToolKit CORE (OTB) API is C++, so there's no preference for the Visual Studio you use. Only make sure you use a Visual Studio that supports 64-bit compiling if you would like to build the TBC on 64-bit as well.

Rule of thumb for the linker (32-bit example below):
TBC < OTBd
TBCd < OTBd
TBCu < OTBud
TBCud < OTBud
u = Unicode version
d = Debug version
For 64-bit, append x64 to all of the above.

Please read the help file, there are sections in how to build the TK CORE (OTB), TK aPI (TBC/TBN) and samples. Compile it with SandCastle - maybe https://github.com/EWSoftware/SHFB works.

Mind x64 vs x86 when registering C++ OPC servers and the systems preference in case the same server name is registered for both x64 and x86.

NEVER EVER EVER EVER use JIT-architecture switching (AnyCPU) for .NET OPC servers.

@ro0ter
Copy link

ro0ter commented Oct 28, 2022

Hello @HovoApoyan , can you please update us on your progress?

@HovoApoyan
Copy link
Author

Hi @ro0ter, I stopped working on this project. Thanks for some help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants