简体   繁体   English

Bash 中的 Execute.cpp 文件 | Ubuntu 18.04

[英]Execute .cpp file in Bash | Ubuntu 18.04

Following these instructions , I want to compile this .cpp code.按照这些说明,我想编译这个.cpp代码。

So far, I have 'vectori s e.cpp' and file named ' a .out'.到目前为止,我有“vectori s e.cpp”和名为“ a .out”的文件。

However, I'm not sure that I need 'a.out'.但是,我不确定我是否需要'a.out'。

Following these instructions , I want to execute 'vectori s e.cpp' like so (notice ' s ' and not ' z '):按照这些说明,我想像这样执行'vectori s e.cpp'(注意' s '而不是' z '):

g++ vectorise.cpp -o vectorise -fopenmp --std=c++17

This is for vectorising .fastq files, which I already have.这是为了对我已经拥有的.fastq文件进行矢量化处理。

This is my terminal currently.这是我目前的终端。 What steps can I now follow to exe 'vectori s e.cpp'?我现在可以按照哪些步骤来执行 exe 'vectori s e.cpp'? 终端

Attempting to copy files into this directory gives Permission Denied:尝试将文件复制到此目录会导致 Permission Denied: 权限被拒绝将文件复制到目录

I wanna give a massive shout out to the squad-fam in the above comment for giving their help in-hand.我想在上面的评论中向小队成员大声疾呼,让他们在手边提供帮助。 This is the code that brought your boy home, to where he belongs:这是将您的男孩带回家,回到他所属的地方的代码:

sudo chmod 777 .
sudo rm a.out
g++ vectorise.cpp -o vectorise -fopenmp --std=c++17

First set your directory to the file which you wish to execute this can be done using cd the type sudo gedit nameoffile.cpp after ./a.out .首先将您的目录设置为您希望执行的文件,这可以在 ./a.out 之后使用cd类型 sudo gedit nameoffile.cpp./a.out

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM