This may be the most challenging C ++ environment configuration (encoding + debugging)-mac + eclipse, -- maceclipse

Source: Internet
Author: User
Tags gdb debugger

This may be the most challenging C ++ environment configuration (encoding + debugging)-mac + eclipse, -- maceclipse

In the spirit of benefiting the public, what if someone might like this kind of environment development ~~ After a day of hard work, Google is Baidu, and there are quite a few pieces of information found in case of errors. It seems that there are not many people developing C ++ in this type of environment. After all, no one has to leave xcode alone, vscode is not needed. Use eclipse to make fun of it...

Preliminary work:
Install eclipse (this is the option of C ++ environment when eclipse is installed, so you don't have to manually install the CDT plug-in). By default, you already have gcc. With these two things, it is okay to compile and run C ++ in the integrated environment.

Key tasks: Certificate installation and path Configuration

In eclipse, click the debug little ladybug icon and you will find that it is not successful and the following error is reported. This is because the mac does not have gdb by default and you need to install it yourself. Install the gdb debugging program. In the mac system, you can run brew install gdb. When you uninstall gdb, use brew uninstall gdb to prevent any subsequent operations from damaging gdb.

After installation, GDB is not allowed to debug any program without special authorization. Therefore, you need to install the self-Signed root certificate and use this certificate to authorize the gdb program. For detailed installation steps, refer to "Login certificate, then, reset the full trust permission and drag it to the system certificate. After the certificate is generated, set a signature for gdb. For detailed commands, see the first link. Set the gdb path of gdb debugger in eclipse as follows. It is the download path of gdb. This is the default path for mac.

After you click the ladybug, the following error is returned.

Then you will try a variety of times, such as Baidu Google's various searches, killing the taskgated process, modifying the user group and permissions of GDB, and setting set startup-with-shell off or writing ~ /. In gdbinit and so on, it still fails. In fact, this is exactly the last step. You have to change the path in the next line of GDB command file in GDB debugger. The default value is. gdbinit, this path must be fully written, Home Directory (If your. gdbinit is generated in the home directory ). Then everything is fine ~


Reference: http://lastline.tech/2017/09/06/85.html

Http://blog.csdn.net/cairo123/article/details/52054280

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.