crt1.o:在函数`_start':(。text + 0x20)中:未定义引用`main'

时间:2017-06-26 15:59:08

标签: c++ compiler-errors cmake cuda itk

我有一小段代码,在尝试<script src="//code.angularjs.org/1.6.2/angular.js"></script> <div ng-app="myApp"> <div ng-controller="MyCtrl as $ctrl"> <forum-form forum="$ctrl.forum" fn="$ctrl.log(data)"></forum-form> </div> <script type="text/ng-template" id="forum_form.tpl.html"> <input type="text" ng-model="data.title" /> <input type="" class="tagsinput" ng-model="data.tagIn" /> <button type="button" ng-click="fn({data: data})">Submit</button> </script> </div>时出现此错误,这里是使用的CMakelists.txt:

from PIL import Image
img = Image.open('gipsy1.jpg')
import tempfile
from PIL import ImageCms
icc = tempfile.mkstemp(suffix='.icc')[1]
with open(icc, 'w') as f:
f.write(img.info.get('icc_profile'))
srgb = ImageCms.createProfile('sRGB')
img = ImageCms.profileToProfile(img, icc, srgb)
img.save('new_srgb_gipsy1.jpg')

main.cu文件如下:

make

在建造时,连接器已经固定好。我无法弄清楚这里有什么问题。

1 个答案:

答案 0 :(得分:0)

我在这里找到了问题,首先我需要使用cuda_add_executable而不是add_executable。这样做并构建,我得到的错误如下:

overriding itk::ImageBase<VImageDimension>::Pointer
itk::ImageBase<VImageDimension>::CreateAnother() const [with unsigned int VImageDimension = 3u, itk::ImageBase<VImageDimension>::Pointer = itk::SmartPointer<itk::ImageBase<3u> >]

这是因为CUDA编译器在使用ITK时使用的C ++功能时遇到问题。使用.cxx文件中的ITK功能并在.cu文件中调用CUDA函数有帮助。

致谢:http://public.kitware.com/pipermail/insight-developers/2012-October/022116.html

相关问题