<?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 Re:LINK 2019 Error When Trying to use sgx_read_rand in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300077#M4780</link>
    <description>&lt;P&gt;Hello Giovanni,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Do you still need help with this issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 20 Jul 2021 19:37:45 GMT</pubDate>
    <dc:creator>JesusG_Intel</dc:creator>
    <dc:date>2021-07-20T19:37:45Z</dc:date>
    <item>
      <title>LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297087#M4722</link>
      <description>&lt;P&gt;Hello, I am a student researcher new to SGX, which is used in my project. I need to create a random number using sgx_read_rand. When I try to I receive the error&amp;nbsp;&lt;SPAN&gt;LNK2019&amp;nbsp;&amp;nbsp; &amp;nbsp;unresolved external symbol _sgx_read_rand referenced in function _main. I have added #include&amp;lt;sgx_trts.h&amp;gt;. I have also tried adding sgx_trts.lib into the additional dependencies, but I still get the same error. I am using Visual Studio 2015. Any help is appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 19:45:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297087#M4722</guid>
      <dc:creator>Giovanni_Plascencia</dc:creator>
      <dc:date>2021-07-08T19:45:27Z</dc:date>
    </item>
    <item>
      <title>Re:LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297118#M4725</link>
      <description>&lt;P&gt;Hello Giovanni,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you run any of the SGX SDK samples successfully? Try compiling and running SampleEnclave.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you can run SampleEnclave successfully, then ensure your project settings match the project settings from SampleEnclave.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I was able to use sgx_read_rand by adding #include &amp;lt;sgx_trts.h&amp;gt; and no other modifications.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jul 2021 22:50:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297118#M4725</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-08T22:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297368#M4728</link>
      <description>&lt;P&gt;I should have mentioned that I ran it in simulation mode. Yes I can run the SampleEnclave, in simulation mode. How can I make sure that the project settings match the project settings of the SamepleEnclave. Could it be that sgx_read_rand does not work in simulation mode?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 17:30:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297368#M4728</guid>
      <dc:creator>Giovanni_Plascencia</dc:creator>
      <dc:date>2021-07-09T17:30:38Z</dc:date>
    </item>
    <item>
      <title>Re:LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297411#M4733</link>
      <description>&lt;P&gt;Hello Giovanny,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I confirmed that sgx_read_rand works in Simulation mode.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Refer &lt;/B&gt;to &lt;A href="https://www.intel.com/content/www/us/en/support/articles/000058917/software/intel-security-products.html" rel="noopener noreferrer" target="_blank"&gt;Unable to Build a Custom Intel® Software Guard Extensions (Intel® SGX)&amp;nbsp;Application in Visual Studio*&lt;/A&gt; to configure the correct settings for your project.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Jul 2021 20:01:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297411#M4733</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-09T20:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297861#M4742</link>
      <description>&lt;P&gt;Hello, I tried those options and they didn't work for me. I am now using the sample enclave as my base and it runs, but when I try to use sgx_read_rand I still get&lt;BR /&gt;&lt;BR /&gt;Error LNK2019 unresolved external symbol _sgx_read_rand referenced in function _main&amp;nbsp;&lt;BR /&gt;as well as&lt;BR /&gt;Error LNK1120 1 unresolved externals&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 16:20:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297861#M4742</guid>
      <dc:creator>Giovanni_Plascencia</dc:creator>
      <dc:date>2021-07-12T16:20:42Z</dc:date>
    </item>
    <item>
      <title>Re:LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297923#M4743</link>
      <description>&lt;P&gt;Hello Giovanni,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you are using the SampleEnclave in Simulation mode, added #include &amp;lt;sgx_trts.h&amp;gt; and you still get the linker error, then the only other variable I see is the version of Visual Studio you are using. The SGX SDK was validated with Visual Studio 2019 and Visual Studio 2015 is not supported. Try updating to Visual Studio 2019 and re-run your tests.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jul 2021 20:45:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1297923#M4743</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-12T20:45:57Z</dc:date>
    </item>
    <item>
      <title>Re:LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1298981#M4760</link>
      <description>&lt;P&gt;Hello Giovanni,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Do you still need help with this issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Jul 2021 22:19:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1298981#M4760</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-15T22:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1299285#M4768</link>
      <description>&lt;P&gt;Hello, Yes I do. I have upgraded to Visual Studio 2019. I am still getting the same error&amp;nbsp;&lt;BR /&gt;LNK2019 Unresolved external symbol_sgx_read_rand referenced in function _main&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 19:24:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1299285#M4768</guid>
      <dc:creator>Giovanni_Plascencia</dc:creator>
      <dc:date>2021-07-16T19:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1299292#M4770</link>
      <description>&lt;P&gt;Hello Giovanni,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are screenshots of my dev environment that may help you. I just noticed you wrote that you are getting that error from function _main. Are you trying to use sgx_read_rand in the untrusted app or the enclave? It cannot be used in the main app, it must be called from within the enclave because it is a trusted function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the code I added to SampleEnclave/Enclave/Enclave.cpp:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier;"&gt;#include "sgx_trts.h"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier;"&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier;"&gt;unsigned char rand_num[4] = "AAA";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier;"&gt;sgx_status_t rand_ret = sgx_read_rand(rand_num, sizeof(rand_num));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier;"&gt;if (rand_ret == SGX_SUCCESS) printf("Rand Success\n");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Loaded DLLs:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sgx_sim_libs.PNG" style="width: 800px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18238i6F8E1586F2CF4F65/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="sgx_sim_libs.PNG" alt="sgx_sim_libs.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enclave Project Properties:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sim_link_general.PNG" style="width: 953px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18239i6F442C9655B284EE/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="sim_link_general.PNG" alt="sim_link_general.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sim_link_input.PNG" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18240iE8C17B4EE4302BCC/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="sim_link_input.PNG" alt="sim_link_input.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Jesus G.&lt;/P&gt;
&lt;P&gt;Intel Customer Support&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 20:27:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1299292#M4770</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-16T20:27:47Z</dc:date>
    </item>
    <item>
      <title>Re:LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300077#M4780</link>
      <description>&lt;P&gt;Hello Giovanni,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Do you still need help with this issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Jul 2021 19:37:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300077#M4780</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-20T19:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300393#M4784</link>
      <description>&lt;P&gt;Thank you so much. I was trying to use sgx_read_rand in the applications main. I placed it in the printf function of the SampleEnclave Enclave.cpp and it reported Rand Success. I am now having trouble figuring out how to create my own function in the Enclave.cpp that will return the random number once called from the applications main.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What I am asking is, how do I create a function in the enclave.cpp that I can call from the application main. I have not figured it out with the documentation that I have read so far. Could you help me with this?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 20:24:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300393#M4784</guid>
      <dc:creator>Giovanni_Plascencia</dc:creator>
      <dc:date>2021-07-21T20:24:40Z</dc:date>
    </item>
    <item>
      <title>Re:LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300424#M4785</link>
      <description>&lt;P&gt;Hello Giovanni,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You need to create an enclave call (ecall) that your untrusted app can call. The &lt;A href="http://www.sgx101.com/portfolio/enclave_example/" rel="noopener noreferrer" target="_blank"&gt;SGX101 enclave_example&lt;/A&gt; is a simple tutorial on creating an enclave with a single ecall and ocall, which is based on the SampleEnclave in the SGX SDK. You should be able to easily modify this code for your purposes. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Refer to the section &lt;I&gt;Enclave Development Basics&lt;/I&gt; in the &lt;A href="https://software.intel.com/content/www/us/en/develop/download/sgx-sdk-developer-reference-windows.html" rel="noopener noreferrer" target="_blank"&gt;Intel SGX SDK Developer Reference Guide for Windows&lt;/A&gt; for complete details on ecalls, ocalls, and other topics you should know when developing SGX applications.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jul 2021 21:51:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300424#M4785</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-21T21:51:29Z</dc:date>
    </item>
    <item>
      <title>Re:LINK 2019 Error When Trying to use sgx_read_rand</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300957#M4792</link>
      <description>&lt;P&gt;&lt;B&gt;This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.&lt;/B&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Jul 2021 21:22:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/LINK-2019-Error-When-Trying-to-use-sgx-read-rand/m-p/1300957#M4792</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-07-23T21:22:49Z</dc:date>
    </item>
  </channel>
</rss>

