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.)