build path--use as source folder 适用场合

今天用eclipse,当打算run一个带有main函数的class时,出现editor does not contain a main type的错误框。

baidu了一下,迅速解决问题:原来这个class所在包没有被添加到build path中。

解决方法:在左侧的package explorer中右击这个class所在包的上一级目录--build path--use as source folder。这样就解决问题了。

重新打开class,再run一下,ok了。

 

 


看这张图,src就是在build path中的(仔细观察src的图标) 
相对的,resource就只是个普通文件夹,而不在build path中(图标和src不一样吧?) 
然后我又在resource下新建了文件夹和文件,比较下,包和文件夹的图标也是不一样的。

现在,我要把resource也加到build path中。(方法就是右击resource--build path--use as source folder


这样,src和resource就都在build path中了。


最后,解释下,什么叫“在build path中”?你可以这么理解,eclipse中,在build path下的类可以被编译运行,在build path下的配置文件可以被类以相对路径直接读写。


完成了 。

### Protobuf for AARCH64-Linux Installation and Usage For the installation of Protocol Buffers (protobuf) on an `aarch64-linux` platform, one can follow a series of commands that ensure all necessary dependencies are installed correctly. The process involves installing development libraries specifically tailored to this architecture. #### Installing Dependencies To prepare the system for protobuf compilation or use, it is essential first to install required packages using package managers like `apt`. For systems based on Debian or Ubuntu derivatives targeting the ARM64 (`aarch64`) architecture: ```bash sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install -y build-essential cmake git pkg-config zip g++ zlib1g-dev unzip python3 python3-pip wget curl libcurl4-gnutls-dev libssl-dev ``` This command installs basic tools needed for building software from source along with Python-related utilities which might be useful when working alongside protobuf applications[^1]. #### Obtaining and Building Protobuf Source Code Given that pre-built binaries may not always exist for every target environment such as `aarch64`, compiling directly from sources becomes necessary. Downloading the latest stable release tarball from GitHub releases page ensures compatibility while also providing access to any recent improvements made by contributors. After extracting the archive into a directory named after its version number—for example, `protobuf-all-x.x.x`—one proceeds inside said folder before executing configuration scripts provided within: ```bash cd /path/to/extracted/folder/ ./autogen.sh ./configure --host=aarch64-linux-gnu CC=/usr/bin/aarch64-linux-gnu-gcc CXX=/usr/bin/aarch64-linux-gnu-g++ make -j$(nproc) sudo make install ``` The above sequence configures the project according to cross-compilation requirements specified through options passed during invocation; here `/usr/bin/aarch64-linux-gnu-gcc` serves as an illustrative path pointing towards appropriate GCC toolchain executables capable of generating code suitable for execution upon devices featuring ARM Cortex-A processors running Linux operating systems[^2]. #### Verifying Installation Success Once completed successfully without errors encountered throughout previous steps, verification checks should confirm proper functioning post-installation via simple test cases utilizing compiled binaries residing under standard locations defined at compile-time unless overridden explicitly earlier. Testing protocol buffer compiler functionality could involve creating minimalistic `.proto` files describing message structures followed by invoking `protoc` utility against them so generated output matches expectations set forth in official documentation accompanying distribution archives downloaded initially. ```bash echo 'syntax = "proto3";message TestMessage { string content = 1;}' >test.proto protoc --version protoc --cpp_out=. ./test.proto ls ./*.pb.cc rm *.pb.* test.proto ``` These operations generate C++ stubs corresponding to messages declared previously then clean up artifacts afterward leaving no trace behind except confirmation logs printed out onto terminal consoles indicating successful completion status codes returned accordingly[^3]. #### Using Protobuf Compiler Effectively With everything now properly configured, developers have multiple ways they can leverage protobuf capabilities depending on specific needs ranging from serializing/deserializing data efficiently across network boundaries down to defining contract-first APIs adhering strictly typed schemas enforced consistently regardless of underlying programming languages chosen later stages implementing business logic atop these foundations laid out beforehand carefully considering performance implications associated closely related aspects involved simultaneously ensuring maintainability over extended periods maintenance cycles expected typically seen enterprise-grade solutions built today's interconnected world wide web infrastructure spanning diverse ecosystems connected together forming vast networks communicating seamlessly exchanging information securely reliably fast accurately cost-effectively scalable resilient robust fault-tolerant architectures supporting modern application development practices widely adopted industry standards open-source communities alike contributing positively overall progress humanity makes collectively advancing knowledge frontiers pushing boundaries further exploring uncharted territories discovering new possibilities emerging continuously horizon expands ever outwardly boundless potential awaits those willing embrace change adapt evolving landscapes transforming rapidly around us constantly shifting paradigms redefining what possible tomorrow promises beyond imagination limits constrained only by current understanding reality shaping future generations inherit legacy leave behind today actions taken shape tomorrows yet unseen written history books read centuries henceforth remembered fondly celebrated achievements milestones reached overcoming challenges faced head-on courageously pursued dreams realized aspirations fulfilled visions materialized concrete forms tangible results manifested physical realm experienced senses perceive consciously aware existence itself.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值