- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I have migrated single cuda file and getting the below error while compilation:
$ dpcpp sample.dp.cpp
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Can you please help to make compilation successfull?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Thanks for providing the details.
We have observed that the source code which you have provided doesn't contain "main", hence you are getting "undefined reference to `main'" error.
Or, If you wanted to generate only an object file and link it later, you can use -c flag.
Ex:
dpcpp -c sample.dp.cpp
Please let us know if this helps you.
If you face any further challenges please do let us know.
Have a Good day!
Thanks & Regards
Goutham
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Could you please share the sample source code which you are trying to migrate? (ex: sample.cu)
Also, let us know the below environmental details.
OS Version:
Intel oneAPI Base toolkit version:
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please find the details below.
OS Version: Ubuntu 18.04
Intel oneAPI Base toolkit version: Intel One API beta 9.0
Also find the attached sample.cu file in .txt fomat.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Thanks for providing the details.
We have observed that the source code which you have provided doesn't contain "main", hence you are getting "undefined reference to `main'" error.
Or, If you wanted to generate only an object file and link it later, you can use -c flag.
Ex:
dpcpp -c sample.dp.cpp
Please let us know if this helps you.
If you face any further challenges please do let us know.
Have a Good day!
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Could you please confirm if your issue is resolved?
If yes, let us know if we can close this thread from our side.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goutham,
Thank you for the response, My issue has been resolved!
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Thanks for the confirmation!
As this issue has been resolved, we will no longer respond to this thread.
If you require any additional assistance from Intel, please start a new thread.
Any further interaction in this thread will be considered community only.
Have a Good day!
Thanks & Regards
Goutham
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page