<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>

<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<p dir="auto">1.clone the source pytorch and success build from source<br>
1.load libtorch<br>
1.compile failed</p>

<h2 dir="auto">Expected behavior</h2>

<p dir="auto">When load torch lib with QTCreator in Window 10,compile failed:<br>
error LNK2019: unresolved external symbol "public: long * __cdecl at::Tensor::data(void)const " (??$data@J@Tensor@at@@QEBAPEAJXZ) referenced in function "public: class at::TensorAccessor&lt;long,1,struct at::DefaultPtrTraits,__int64&gt; __cdecl at::Tensor::accessor&lt;long,1&gt;(void)const &amp; " (??$accessor@J$00@Tensor@at@@QEGBA?AV?$TensorAccessor@J$00UDefaultPtrTraits@at@@_J@1@XZ)</p>
<p dir="auto">my .pro:<br>
INCLUDEPATH += D:/app/conda/envs/pytorch/Lib/site-packages/torch/include <br>
INCLUDEPATH += D:/app/conda/envs/pytorch/Lib/site-packages/torch/include/torch <br>
INCLUDEPATH += D:/app/conda/envs/pytorch/Lib/site-packages/torch/include/torch/csrc/api/include <br>
INCLUDEPATH += D:/app/conda/envs/pytorch/Lib/site-packages/torch/include/ATen</p>
<p dir="auto">LIBS += -LD:/app/conda/envs/pytorch/Lib/site-packages/torch/lib <br>
-lc10 -lc10_cuda -ltorch -ltorch_python -l_C <br>
-lcaffe2_detectron_ops_gpu -lcaffe2_module_test_dynamic <br>
-lfoxi_dummy -lonnxifi_dummy -lonnxifi_loader -lfoxi_loader -lonnx -lonnx_proto <br>
-lshm -lcaffe2_observers -lcaffe2_detectron_ops_gpu -lcaffe2_nvrtc <br>
-lcaffe2 -lcaffe2_gpu -lclog -lcpuinfo <br>
-lcaffe2_module_test_dynamic -lthnvrtc -llibprotoc -llibprotobuf -llibprotobuf-lite</p>
<h2 dir="auto">Environment</h2>
<p dir="auto">Please copy and paste the output from our<br>
<a href="https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py" rel="nofollow">environment collection script</a><br>
(or fill out the checklist below manually).</p>
<p dir="auto">You can get the script and run it with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py"><pre class="notranslate"><code class="notranslate">wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
</code></pre></div>
<ul dir="auto">
<li>PyTorch Version (e.g., 1.0): PyTorch 1.2.0a0+b1bf16e</li>
<li>OS (e.g., Linux): Window10</li>
<li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source): source</li>
<li>Build command you used (if compiling from source): python setup.py install</li>
<li>Python version: Python 3.6.8</li>
<li>CUDA/cuDNN version: CUDA 9.0/cuDnn 7.5</li>
<li>GPU models and configuration:</li>
<li>Any other relevant information:</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">I AM trying to execute buid_and_install.sh from github <a href="https://github.com/sshaoshuai/PointRCNN">https://github.com/sshaoshuai/PointRCNN</a> on windows10, pytorch 1.1, gcc 8.1.0, VS2017<br>
the second task, iou3d.<br>
I met problem of unresolved external symbol,  "public: long * __cdecl at::Tensor::data(void)const "<br>
ALL THESE libs have been found, cudart.lib c10.lib c10_cuda.lib caffe2.lib torch.lib torch_python.lib caffe2_gpu.lib _C.lib, but I think I DO miss one lib, according to the problem.<br>
is it possible that the author use pytorch 1.0?<br>
and I have read quite a lot issue with error LNK2001, BUT no idea how to solve mine<br>
plz, help...</p>