Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

C++ #include problem

More
27 Jul 2016 16:05 #4281 by support
Replied by support on topic C++ #include problem
It's in your own, first post in this thread. E.g.

#import "libid:BED7F4EA-1A96-11D2-8F08-00A0C9A6186D"
#import "libid:ecf2e77d-3a90-4fb8-b0e2-f529f0cae9c9"
#import "libid:1F165598-2F77-41C8-A9F9-EAF00C943F9F"

But, as I wrote, for reasonable coding you need ATL/MFC, and that's not available with VS Express.

Please Log in or Create an account to join the conversation.

More
27 Jul 2016 15:59 #4280 by olab
Replied by olab on topic C++ #include problem
Can you please explain teh syntax of doing this import?



Kind regards

Please Log in or Create an account to join the conversation.

More
27 Jul 2016 15:43 #4279 by support
Replied by support on topic C++ #include problem
My previous answer is also valid for an unmanaged DLL project type. Use the #import-s.

Please Log in or Create an account to join the conversation.

More
27 Jul 2016 15:21 #4278 by olab
Replied by olab on topic C++ #include problem
My project is defined as Dynamic Link Library (Configuration type) and Common Language Rintime support is set to NO. This diables the possibility to et up references. If I change Common Language Support the project won't work.

Please Log in or Create an account to join the conversation.

More
27 Jul 2016 08:55 #4270 by support
Replied by support on topic C++ #include problem
In an unmanaged C++ project, you do not add references to the project itself. You just use #import directives.

In a managed C++ project, right-click on it in the Visual Studio Solution Explorer, select Common Properties -> Framework and References, press "Add New Reference", and select the assemblies (which one is which is described in the Concepts doc).

Please Log in or Create an account to join the conversation.

More
26 Jul 2016 18:14 #4267 by olab
Replied by olab on topic C++ #include problem
Now I see that the ConsoleApplication Demo give me all the help I in fact need.

Now I wonder how to add dependencies to the OpcLabs DLL's in my project. In VB there is something like "Add Reference". I guess I'm looking for somehing similar..


Regards O

Please Log in or Create an account to join the conversation.

More
26 Jul 2016 17:59 #4265 by support
Replied by support on topic C++ #include problem
The examples use ATL/MFC libraries that are not supported in the Express edition of Visual Studio 2013.

msdn.microsoft.com/en-us/library/hh967573(v=vs.120).aspx

social.msdn.microsoft.com/Forums/en-US/997194c1-2ef5-474d-9e...o-2013-express?forum=vcgeneral

I think you are out of luck in this respect, with the Express edition and our examples. While ATL/MFC is not strictly necessary (and it should be possible to write a working code without them), they are so useful that it does not make sense for us to provide examples that would not require them.

You may still be able to use managed C++ (those are under the .NET examples), or any .NET based examples such as C# (this forum topic actually should have been started under QuickOPC-COM, because the examples you are referring to are using the COM interfaces of QuickOPC).

Best regards

Please Log in or Create an account to join the conversation.

More
26 Jul 2016 17:33 #4264 by olab
Replied by olab on topic C++ #include problem
I'm using Visual Studio Express 2013 and 5.35 of Quick OPC
Attachments:

Please Log in or Create an account to join the conversation.

More
26 Jul 2016 17:10 #4263 by support
Replied by support on topic C++ #include problem
Can you please provide following:

1. Edition and version of Visual Studio
2. Version and build of QuickOPC (hint: it is on the first page of installation wizard).
3. A copy of the actual error message you are getting.

Thank you

Please Log in or Create an account to join the conversation.

More
26 Jul 2016 17:02 #4262 by olab
C++ #include problem was created by olab
Hello,
This is my first post here. I'm currenty working my first application in Visual C++ and is trying to open the demoproject included in the quick opc intallation to understand the code.

#include <atlsafe.h> is giving me an error.

later in the code:
#import "libid:BED7F4EA-1A96-11D2-8F08-00A0C9A6186D"
#import "libid:ecf2e77d-3a90-4fb8-b0e2-f529f0cae9c9"
#import "libid:1F165598-2F77-41C8-A9F9-EAF00C943F9F"
is giving me similar errors.

Can someone explain why to a newbie?

Kind regards..

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.058 seconds