<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cannot compile demo application in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Cannot-compile-demo-application/m-p/1144332#M2367</link>
    <description>&lt;P&gt;Through Visual Studio SGX plugin, I created a demo application whose EDL is the following:&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;enclave {
    from "sgx_tstdc.edl" import *;

    trusted { 
		public char* sign([in, string] const char* message, unsigned saltLength);
    };

    untrusted { 
    };
};&lt;/PRE&gt;

&lt;P&gt;The sign function, right now, just returns a nullptr, so it shouldn't be the problem.&lt;BR /&gt;
	&lt;BR /&gt;
	Trying to compile with Intel Compiler, I get the error "&lt;SPAN style="font-size: 12.195px;"&gt;argument of type "long *" is incompatible with parameter of type "int *"Enclave C:\Program Files (x86)\Intel\IntelSGXSDK\include\libc++\atomic&amp;nbsp; 1998".&lt;BR /&gt;
	&lt;BR /&gt;
	Following this post&amp;nbsp;&lt;A href="https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/747943"&gt;https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/747943&amp;nbsp;&lt;/A&gt;I switched to MSVC, which now, in turn, gives me the error "_mm_lfence identifier not found".&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12.195px;"&gt;This function is automatically used by the SGX proxy function and I&amp;nbsp;have no control over it.&lt;BR /&gt;
	What am I missing?&lt;BR /&gt;
	&lt;BR /&gt;
	Thank you&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Feb 2018 10:31:27 GMT</pubDate>
    <dc:creator>Caprioli__Nico</dc:creator>
    <dc:date>2018-02-24T10:31:27Z</dc:date>
    <item>
      <title>Cannot compile demo application</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Cannot-compile-demo-application/m-p/1144332#M2367</link>
      <description>&lt;P&gt;Through Visual Studio SGX plugin, I created a demo application whose EDL is the following:&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;enclave {
    from "sgx_tstdc.edl" import *;

    trusted { 
		public char* sign([in, string] const char* message, unsigned saltLength);
    };

    untrusted { 
    };
};&lt;/PRE&gt;

&lt;P&gt;The sign function, right now, just returns a nullptr, so it shouldn't be the problem.&lt;BR /&gt;
	&lt;BR /&gt;
	Trying to compile with Intel Compiler, I get the error "&lt;SPAN style="font-size: 12.195px;"&gt;argument of type "long *" is incompatible with parameter of type "int *"Enclave C:\Program Files (x86)\Intel\IntelSGXSDK\include\libc++\atomic&amp;nbsp; 1998".&lt;BR /&gt;
	&lt;BR /&gt;
	Following this post&amp;nbsp;&lt;A href="https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/747943"&gt;https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/747943&amp;nbsp;&lt;/A&gt;I switched to MSVC, which now, in turn, gives me the error "_mm_lfence identifier not found".&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12.195px;"&gt;This function is automatically used by the SGX proxy function and I&amp;nbsp;have no control over it.&lt;BR /&gt;
	What am I missing?&lt;BR /&gt;
	&lt;BR /&gt;
	Thank you&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2018 10:31:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Cannot-compile-demo-application/m-p/1144332#M2367</guid>
      <dc:creator>Caprioli__Nico</dc:creator>
      <dc:date>2018-02-24T10:31:27Z</dc:date>
    </item>
    <item>
      <title>If you can try to change the</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Cannot-compile-demo-application/m-p/1144333#M2368</link>
      <description>&lt;P&gt;If you can try to change the project configuration to "Simulation" mode instead of "Release" or "Debug" to see whether the issue exists or not. If it still does, please zip and post your sample solution here if you can so we can recreate the issue better. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 01:53:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Cannot-compile-demo-application/m-p/1144333#M2368</guid>
      <dc:creator>Hoang_N_Intel</dc:creator>
      <dc:date>2018-02-27T01:53:08Z</dc:date>
    </item>
    <item>
      <title>Quote:Hoang Nguyen (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Cannot-compile-demo-application/m-p/1144334#M2369</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Hoang Nguyen (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;If you can try to change the project configuration to "Simulation" mode instead of "Release" or "Debug" to see whether the issue exists or not. If it still does, please zip and post your sample solution here if you can so we can recreate the issue better. Thanks.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Changing to Simulation, I noticed that the compiler compiled the autogenerated files as C instead of C++. Back to debug I manually selected "Compile as C" in file properties and it finally compiled fine. It seems like MSVC tried to compile it as C++ file and missed something.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 11:46:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Cannot-compile-demo-application/m-p/1144334#M2369</guid>
      <dc:creator>Caprioli__Nico</dc:creator>
      <dc:date>2018-02-27T11:46:29Z</dc:date>
    </item>
  </channel>
</rss>

