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.

Cannot Compile mscorlib.tlh (C++, VS 2017)

More
05 Dec 2017 18:25 #5712 by support
Oh, great.

Sorry that I had you waiting - but in the end, it would have been impossible for me to figure it out anyway, without having your source code that contained the cause.

Best regards

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

More
05 Dec 2017 18:13 #5711 by MPick
I figured this out, somewhere I had a #define or ||, which was overlapping with the function argument 'or' used in the .tlh file. The solution was to undefine that macro before including QuickOPC.h

Thanks!

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

More
04 Dec 2017 20:51 #5710 by MPick
Thanks for the quick reply, here you go.
Attachments:

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

More
04 Dec 2017 20:28 - 04 Dec 2017 20:29 #5709 by support
Hello,
can you post the generated mscorlib.tlh file too?

(please zip it first)

Thank you
Last edit: 04 Dec 2017 20:29 by support.

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

More
04 Dec 2017 19:35 #5708 by MPick
Hi,

I've attempted to add quick OPC to our visual studio project. As far as I can tell I've replicated the project setup from the examples (which I re-targeted to the v141 toolset and compiled just fine.)

Based on the headers in the examples, the header where I would like to interface with Quick OPC looks like this:
#pragma once
#ifndef _WIN32_WINNT            // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600     // Change this to the appropriate value to target other versions of Windows.
#endif
#include <stdio.h>
#include <tchar.h>
 
 
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
 
#include <atlbase.h>
#include <atlstr.h>
#include <atlcom.h>
#include <atlsafe.h>
#include <comutil.h>
 
#include "QuickOpc.h"
 

I've copied the SDK folder into my visual studio project (it's policy for us to keep our dependencies in a 'deps' folder), and set up VS to copy the appropriate files to our output directory + correctly link QuickOPC.h.

However when I try to compile I run into problems with mscorlib.tlh (& .tli), many syntax errors are thrown. Many of the errors look like:
13:39:07.787     1>c:\users\admin\documents\projects\pcs\pcs\pcs-supervisor\x64\debug\mscorlib.tlh(12974): error C2143: syntax error: missing ')' before '||'
13:39:07.788     1>c:\users\admin\documents\projects\pcs\pcs\pcs-supervisor\x64\debug\mscorlib.tlh(12974): error C2143: syntax error: missing ';' before '||'
13:39:07.788     1>c:\users\admin\documents\projects\pcs\pcs\pcs-supervisor\x64\debug\mscorlib.tlh(12974): error C2059: syntax error: '||'
13:39:07.788     1>c:\users\admin\documents\projects\pcs\pcs\pcs-supervisor\x64\debug\mscorlib.tlh(12974): error C2059: syntax error: ')'

See the attached file 'pcs-supervisor.log' which is the build log (with the highest verbosity) from visual studio for more. I have also included the projects .vcxproj file.

Is there a setting in my configuration that is incompatible with mscorlib? I've googled around already no no avail.

Please let me know if there's any other useful information I can provide.

Thanks,

(PS, sorry for resubmitting, files didn't attach.)
Attachments:

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

Moderators: support
Time to create page: 0.052 seconds