Commit 8d19ba6f by songxinkai

~

parent ef0b55dd
cmake_minimum_required (VERSION 3.1)
set (CMAKE_CXX_COMPILER "/home/songxinkai/user/local/bin/g++")
project (test_0)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -g -O0")
set(protobuf_exec "/home/songxinkai/protobuf-3.11.2/build/bin/protoc")
set(protobuf_include_dir "/home/songxinkai/protobuf-3.11.2/build")
set(protobuf_library "/home/songxinkai/protobuf-3.11.2/build/lib/libprotobuf.so")
# set(eden_include "eden.ph.h")
# set(eden_src "eden.pb.cc")
# add_custom_command(OUTPUT eden_include eden_src
# COMMAND "protoc eden.proto --cpp_out=."
# )
#
# message("=========== ===========")
# message("${eden_include} ${eden_src}")
# message("=========== ===========")
set(test_src "${PROJECT_SOURCE_DIR}/test_0.cpp")
set(eden_src "${PROJECT_SOURCE_DIR}/eden.pb.cc")
add_executable(test "${test_src}" "${eden_src}")
include_directories("${protobuf_include_dir}" "${PROJECT_SOURCE_DIR}")
target_link_libraries(test "${protobuf_library}")
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: eden.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_eden_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_eden_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3011000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3011002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_eden_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_eden_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_eden_2eproto;
namespace eden {
class pigs;
class pigsDefaultTypeInternal;
extern pigsDefaultTypeInternal _pigs_default_instance_;
} // namespace eden
PROTOBUF_NAMESPACE_OPEN
template<> ::eden::pigs* Arena::CreateMaybeMessage<::eden::pigs>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace eden {
// ===================================================================
class pigs :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:eden.pigs) */ {
public:
pigs();
virtual ~pigs();
pigs(const pigs& from);
pigs(pigs&& from) noexcept
: pigs() {
*this = ::std::move(from);
}
inline pigs& operator=(const pigs& from) {
CopyFrom(from);
return *this;
}
inline pigs& operator=(pigs&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const pigs& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const pigs* internal_default_instance() {
return reinterpret_cast<const pigs*>(
&_pigs_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(pigs& a, pigs& b) {
a.Swap(&b);
}
inline void Swap(pigs* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline pigs* New() const final {
return CreateMaybeMessage<pigs>(nullptr);
}
pigs* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<pigs>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const pigs& from);
void MergeFrom(const pigs& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(pigs* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "eden.pigs";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_eden_2eproto);
return ::descriptor_table_eden_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kCountFieldNumber = 1,
kSpeedFieldNumber = 2,
kSightFieldNumber = 3,
};
// int32 count = 1;
void clear_count();
::PROTOBUF_NAMESPACE_ID::int32 count() const;
void set_count(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_count() const;
void _internal_set_count(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// float speed = 2;
void clear_speed();
float speed() const;
void set_speed(float value);
private:
float _internal_speed() const;
void _internal_set_speed(float value);
public:
// float sight = 3;
void clear_sight();
float sight() const;
void set_sight(float value);
private:
float _internal_sight() const;
void _internal_set_sight(float value);
public:
// @@protoc_insertion_point(class_scope:eden.pigs)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::int32 count_;
float speed_;
float sight_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_eden_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// pigs
// int32 count = 1;
inline void pigs::clear_count() {
count_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 pigs::_internal_count() const {
return count_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 pigs::count() const {
// @@protoc_insertion_point(field_get:eden.pigs.count)
return _internal_count();
}
inline void pigs::_internal_set_count(::PROTOBUF_NAMESPACE_ID::int32 value) {
count_ = value;
}
inline void pigs::set_count(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_count(value);
// @@protoc_insertion_point(field_set:eden.pigs.count)
}
// float speed = 2;
inline void pigs::clear_speed() {
speed_ = 0;
}
inline float pigs::_internal_speed() const {
return speed_;
}
inline float pigs::speed() const {
// @@protoc_insertion_point(field_get:eden.pigs.speed)
return _internal_speed();
}
inline void pigs::_internal_set_speed(float value) {
speed_ = value;
}
inline void pigs::set_speed(float value) {
_internal_set_speed(value);
// @@protoc_insertion_point(field_set:eden.pigs.speed)
}
// float sight = 3;
inline void pigs::clear_sight() {
sight_ = 0;
}
inline float pigs::_internal_sight() const {
return sight_;
}
inline float pigs::sight() const {
// @@protoc_insertion_point(field_get:eden.pigs.sight)
return _internal_sight();
}
inline void pigs::_internal_set_sight(float value) {
sight_ = value;
}
inline void pigs::set_sight(float value) {
_internal_set_sight(value);
// @@protoc_insertion_point(field_set:eden.pigs.sight)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace eden
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_eden_2eproto
syntax = "proto3";
package eden;
message pigs{
int32 count = 1;
float speed = 2;
float sight = 3;
}
#include <iostream>
#include "eden.ph.h"
using namespace std;
int main(){
return 0;
}
......@@ -4,4 +4,4 @@ project(helloworld)
set (helloworld_version_major 1)
set (helloworld_version_minor 0)
add_executable(helloworld main.cpp)
add_executable(helloworld "main.cpp")
......@@ -11,20 +11,88 @@ set(CMAKE_MAKEFILE_DEPENDS
"CMakeFiles/3.14.6/CMakeCCompiler.cmake"
"CMakeFiles/3.14.6/CMakeCXXCompiler.cmake"
"CMakeFiles/3.14.6/CMakeSystem.cmake"
"CMakeFiles/feature_tests.c"
"CMakeFiles/feature_tests.cxx"
"/usr/share/cmake3/Modules/CMakeCCompiler.cmake.in"
"/usr/share/cmake3/Modules/CMakeCCompilerABI.c"
"/usr/share/cmake3/Modules/CMakeCInformation.cmake"
"/usr/share/cmake3/Modules/CMakeCXXCompiler.cmake.in"
"/usr/share/cmake3/Modules/CMakeCXXCompilerABI.cpp"
"/usr/share/cmake3/Modules/CMakeCXXInformation.cmake"
"/usr/share/cmake3/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
"/usr/share/cmake3/Modules/CMakeCommonLanguageInclude.cmake"
"/usr/share/cmake3/Modules/CMakeCompilerIdDetection.cmake"
"/usr/share/cmake3/Modules/CMakeDetermineCCompiler.cmake"
"/usr/share/cmake3/Modules/CMakeDetermineCXXCompiler.cmake"
"/usr/share/cmake3/Modules/CMakeDetermineCompileFeatures.cmake"
"/usr/share/cmake3/Modules/CMakeDetermineCompiler.cmake"
"/usr/share/cmake3/Modules/CMakeDetermineCompilerABI.cmake"
"/usr/share/cmake3/Modules/CMakeDetermineCompilerId.cmake"
"/usr/share/cmake3/Modules/CMakeDetermineSystem.cmake"
"/usr/share/cmake3/Modules/CMakeFindBinUtils.cmake"
"/usr/share/cmake3/Modules/CMakeGenericSystem.cmake"
"/usr/share/cmake3/Modules/CMakeInitializeConfigs.cmake"
"/usr/share/cmake3/Modules/CMakeLanguageInformation.cmake"
"/usr/share/cmake3/Modules/CMakeParseImplicitIncludeInfo.cmake"
"/usr/share/cmake3/Modules/CMakeParseImplicitLinkInfo.cmake"
"/usr/share/cmake3/Modules/CMakeSystem.cmake.in"
"/usr/share/cmake3/Modules/CMakeSystemSpecificInformation.cmake"
"/usr/share/cmake3/Modules/CMakeSystemSpecificInitialize.cmake"
"/usr/share/cmake3/Modules/CMakeTestCCompiler.cmake"
"/usr/share/cmake3/Modules/CMakeTestCXXCompiler.cmake"
"/usr/share/cmake3/Modules/CMakeTestCompilerCommon.cmake"
"/usr/share/cmake3/Modules/CMakeUnixFindMake.cmake"
"/usr/share/cmake3/Modules/Compiler/ADSP-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Borland-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
"/usr/share/cmake3/Modules/Compiler/Clang-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
"/usr/share/cmake3/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Cray-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/GHS-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU-C-FeatureTests.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU-C.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU-CXX-FeatureTests.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU-CXX.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU-FindBinUtils.cmake"
"/usr/share/cmake3/Modules/Compiler/GNU.cmake"
"/usr/share/cmake3/Modules/Compiler/HP-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/IAR-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
"/usr/share/cmake3/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
"/usr/share/cmake3/Modules/Compiler/Intel-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/MSVC-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/PGI-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/PathScale-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/SCO-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/TI-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/Watcom-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/XL-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
"/usr/share/cmake3/Modules/Internal/CMakeCheckCompilerFlag.cmake"
"/usr/share/cmake3/Modules/Internal/FeatureTesting.cmake"
"/usr/share/cmake3/Modules/Platform/Linux-Determine-CXX.cmake"
"/usr/share/cmake3/Modules/Platform/Linux-GNU-C.cmake"
"/usr/share/cmake3/Modules/Platform/Linux-GNU-CXX.cmake"
"/usr/share/cmake3/Modules/Platform/Linux-GNU.cmake"
......@@ -40,6 +108,11 @@ set(CMAKE_MAKEFILE_OUTPUTS
# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
"CMakeFiles/3.14.6/CMakeSystem.cmake"
"CMakeFiles/3.14.6/CMakeCCompiler.cmake"
"CMakeFiles/3.14.6/CMakeCXXCompiler.cmake"
"CMakeFiles/3.14.6/CMakeCCompiler.cmake"
"CMakeFiles/3.14.6/CMakeCXXCompiler.cmake"
"CMakeFiles/CMakeDirectoryInformation.cmake"
)
......
......@@ -6,6 +6,9 @@ if sys.version_info.major == 2:
else:
import tkinter as tk # python3
def add_count():
root = tk.Tk()
li = ['C','python','php','html','SQL','java']
movie = ['CSS','jQuery','Bootstrap']
......@@ -17,6 +20,11 @@ for item in li: # 第一个小部件插入数据
for item in movie: # 第二个小部件插入数据
listb2.insert(0,item)
label = tk.
label.pack()
listb.pack() # 将小部件放置到主窗口中
listb2.pack()
root.
root.after(1000, )
root.mainloop()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment