2011-12-28 55 views
3

有人知道在使用Qt Creator時突出顯示CUDA代碼的方法嗎?我可以在vim和kate中這樣做,但不能在Qt Creator中使用,我必須使用它。Qt Creator中的CUDA語法高亮

+0

嗨,你是自己製作凱特版還是找到它? – GradGuy 2012-07-12 05:15:18

回答

4

如果你能突出凱特CUDA代碼,那麼你可以在Qt Creator中也因爲Qt Creator中做generic highlighting is based on highlight definition files that are provided by the Kate Editor.

雖然Qt Creator的幫助你下載的亮點定義文件(見documentation),可惜我不能請參見下載定義對話框中的CUDA,因此您必須手動將您使用的CUDA突出顯示定義文件複製到Qt Creator預期的位置(請參閱LocationFallback location中提到的documentation)。

0

A quick workaround is to add .cu and .cuh in cpp.xml in qt creator's generic-highlighter folder as below. 一個快速的解決方法是在qt creator的generic-highlighter文件夾(如上面)的cpp.xml中添加.cu和.cuh。