- Forum
- Discussions
- QuickOPC-Classic in COM
- General Issues, Building
- Cannot Compile mscorlib.tlh (C++, VS 2017)
Cannot Compile mscorlib.tlh (C++, VS 2017)
05 Dec 2017 18:25 #5712
by support
Replied by support on topic Cannot Compile mscorlib.tlh (C++, VS 2017)
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
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.
05 Dec 2017 18:13 #5711
by MPick
Replied by MPick on topic Cannot Compile mscorlib.tlh (C++, VS 2017)
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!
Thanks!
Please Log in or Create an account to join the conversation.
04 Dec 2017 20:51 #5710
by MPick
Replied by MPick on topic Cannot Compile mscorlib.tlh (C++, VS 2017)
Thanks for the quick reply, here you go.
Please Log in or Create an account to join the conversation.
04 Dec 2017 20:28 - 04 Dec 2017 20:29 #5709
by support
Replied by support on topic Cannot Compile mscorlib.tlh (C++, VS 2017)
Hello,
can you post the generated mscorlib.tlh file too?
(please zip it first)
Thank you
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.
04 Dec 2017 19:35 #5708
by MPick
Cannot Compile mscorlib.tlh (C++, VS 2017) was created 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:
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:
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.)
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.)
Please Log in or Create an account to join the conversation.
Moderators: support
- Forum
- Discussions
- QuickOPC-Classic in COM
- General Issues, Building
- Cannot Compile mscorlib.tlh (C++, VS 2017)
Time to create page: 0.193 seconds