开发者

How to open tar.gz files in eclipse

开发者 https://www.devze.com 2023-01-09 06:26 出处:网络
If I downloaded a tar.gz file on my computer and extracted it with code in it, how do I run it in eclipse in Linux (for C). The downloaded files contains .c files开发者_如何学编程 and .o files.I can\'

If I downloaded a tar.gz file on my computer and extracted it with code in it, how do I run it in eclipse in Linux (for C). The downloaded files contains .c files开发者_如何学编程 and .o files.


I can't help with Eclipse, but I can help you compile and run the code. Ok, to extract:

tar -xvzf name_of_your_archive_file.tar.gz

In the above, 'x' means extract, while 'v' means verbose, 'z' means .tar.gz compression, and 'f' stands for file (because you specify the name of the .tar.gz file immediately after the invocation).

Now that you have extracted the archive, you can navigate into it with:

 cd name_of_your_archive_file

After which you can list the directory contents:

 ls

The '.o' files you mentioned aren't really helpful, unless they were compiled for your architecture ('.o' files are build products that typically need to be generated for each different type of OS and CPU type).

Any well-made project will contain a file name 'README' that explains how to build the project. You can use the 'cat' command (which stands for 'concatenate'... it will eventually make sense) to display the content of the 'README' file like so:

cat README

If the README is very long, you can make it show you only a portion by using the less command:

cat README | less

Now, if there is no README or it doesn't tell you how to build the project, but there is a file named 'Makefile', then you would ordinarily build the project by invoking the following command:

make


You're probably doing it wrong. Most Eclipse extensions prefer to be loaded via Help ➤ Install New Software...

0

精彩评论

暂无评论...
验证码 换一张
取 消