[02:35] 有没有人遇到过编译出来的程序被识别成了 shared object 无法在 nautilus 里面直接双击执行? [02:45] andyhuzhill: file看一下那个文件 [02:50] iMadper: https://imgur.com/a/8AR2s [02:50] andyhuzhill: ⇪ Imgur: The magic of the Internet [02:51] 执行是没有问题 就是在nautilus 里面被识别成了共享库 没法双击执行了 [02:52] andyhuzhill: 这个就是个shared object... 倒不是nautilus识别错了 [02:52] 这是一个可执行文件啊 [02:52] 你没看到我前面的命令么 就是编译了一个简单的 hello world [02:53] andyhuzhill: 我看到了, 我在想是不是g++的问题 [02:54] 哎呦, 都是shared object... [02:54] * iMadper 匿了匿了 [02:54] gcc version 5.4.1 20171010 (Ubuntu 5.5.0-1ubuntu2) [02:54] andyhuzhill: 不过你期待的nautilus的行为是啥呢? [02:55] andyhuzhill: 执行helloworld的时候先*自动*起一个console, 然后console里面再执行你的helloworld? [02:56] 我这只是演示这个问题 我实际要执行的一个程序是GUI程序 [02:59] andyhuzhill: -no-pie [02:59] andyhuzhill: 试试看编译的时候加这个参数 [02:59] 这是啥参数? 加上之后就变executable 了 [03:00] andyhuzhill: 因为你用的gcc, 编译的时候开了 --enable-default-pie [03:01] andyhuzhill: 具体的区别我也不清楚, 毕竟man手册也没写太清楚... [03:01] -pie [03:01] Produce a position independent executable on targets that support it. For predictable results, you must also specify the same set of options used for compilation (-fpie, -fPIE, or model [03:01] suboptions) when you specify this linker option. [03:01] 不好意思, 格式有点乱... [03:01] 😅 谢谢啦 iiMadper [03:02] andyhuzhill: 没事儿, 我也是随手一查... === chen is now known as Guest49590 [12:31] hi [12:31] u0_a257:点点点. 20:31 === sixand1 is now known as sixand