Cygwin: no such file or directory

Source: Internet
Author: User

 Reprinted! Please indicate the source when reprint: http://write.blog.csdn.net/postedit/8195159

I have been entangled in this problem for a day or two. I checked various materials. According to the online materials, the problem of path ing is the same as my current conclusion ..

I recently studied Google protocol buffer and needed to compile a. proto extension helloworld. proto file with cygwin.

Helloworld. proto Directory: C: \ Users \ Potter \ Documents \ work \ protocol buffer \ protobuf-2.4.1 \ SRC (under my directory)

We open cygwin directly, and then I use the following command to compile it. As follows:

The path I drew with the red line is indeed correct, and CD can also be used directly. Why is the prompt no such file or directory?

If you read it carefully, you will find a potter @ Potter-PC ~ Yes, that's the problem. cygwin needs to input the relative path...

If the completion path is like this:/home/Potter/cygdrive/C/users/Potter/documents/work/protocol \ buffer/protobuf-2.4.1/src/That's it

In fact, the above/home/Potter is the root directory of Linux simulated by cygwin...

After talking about this for a long time, how can we use it directly?

Solution 1:

CD to the root directory of helloworld. proto and then run:

No prompt. Basically, the compilation is successful...

I am not mistaken. What should I do if my files are not in this directory?

Solution 2:

You can always store the files in the same disk as the files to be compiled ~ If it is on a different disk, I do not know how cygwin is written for reference. If you know it, please tell me, thank you ~

The input method is as follows:

OK generation successful ~ In fact, method 2 and method 1 are the same, but I want to explain that, first CD to the root directory of the same drive letter, such as the C drive here... then, you can easily compile it ~

 

Q: How does cygwin reference different disks? Tell me if you know it ~ Thanks

 

Okay. I will go hiking tomorrow morning ~ I have to raise my spirits. I am asleep ~ Haha ~

 

Thank you for reading my blog and hope you can see your footprints!
If something is wrong or incorrect,I also hope you can point it out!

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.