c - C 中的 TensorFlow : Why do I get a compilation error in hello_tf. c?

标签 c ubuntu

我尝试在 Ubuntu 上安装适用于 C 的 TensorFlow。我按照 https://www.tensorflow.org/install/install_c 上的所有说明进行操作.

请参阅下面的命令和结果。为什么我会收到编译错误?

cd /home/sarkar/tensorflow
gcc hello_tf.c

输出:

hello_tf.c: In function ‘main’:
hello_tf.c:5:3: error: stray ‘\342’ in program
printf(“Tensor flow C library version %s\n”,TF_Version());
      ^
hello_tf.c:5:3: error: stray ‘\200’ in program
hello_tf.c:5:3: error: stray ‘\234’ in program
hello_tf.c:5:13: error:‘Tensor’ undeclared (first use in thisfunction)
   printf(“Tensor flow C library version %s\n”,TF_Version());
                  ^
hello_tf.c:5:13: note: each undeclared identifier is reported only
once for each function it appears in
hello_tf.c:5:20: error: expected ‘)’ before ‘flow’
     printf(“Tensor flow C library version %s\n”,TF_Version());
                    ^
hello_tf.c:5:20: error: stray ‘\’ in program
hello_tf.c:5:20: error: stray ‘\342’ in program

最佳答案

经过一番研究,我发现了这个:GCC stray errors

错误的原因是引号。一个可能的解决办法是更换它们。

关于c - C 中的 TensorFlow : Why do I get a compilation error in hello_tf. c?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44730791/

相关文章:

c - 我需要一个工具来在单个文本文件或一组文本文件中查找重复或相似的文本 block

c - C 中的胖指针

枚举中的常量在定义中未见

firefox - 如何运行两个独立的 Firefox 实例?

git - 删除运行 git rm --cached 后无法恢复文件

c - 如何按等级和姓氏字母顺序对结构进行排序

c++ - 直接访问硬盘?

javascript - 无法解析主机 github.com

linux - 通过特定客户端连接到 centos 服务器时出错

ubuntu - Cloud-init:如何从源代码安装它?