GithubHelp home page GithubHelp logo

tboox / community Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 6 KB

TBOOX Open Source Community

Home Page: https://github.com/tboox/community/issues

License: Apache License 2.0

xmake tbox itrace vm86 hnr tboox c lua build-tools cross-platform

community's Introduction

Welcome to TBOOX Open Source Community (中文)

Technical discussion

  • C/C++/Lua Language
  • The Cross-platform Development
  • The TBOOX Open Source Projects

Community Navigation

Post specifications

  • Please add a title prefix: [disussion], [question], [share], [help wanted], for example: [disussion]:XXX
  • Watch accept the latest community news, Subscribe subscribe to current discussion posts

Contacts

community's People

Contributors

waruqi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

community's Issues

Welcome to TBOOX Open Source Community

Technical discussion

  • C/C++/Lua Language
  • The Cross-platform Development
  • The TBOOX Open Source Projects

Community Navigation

Post specifications

  • Please add a title prefix: [disussion], [question], [share], [help wanted], for example: [disussion]:XXX
  • Watch accept the latest community news, Subscribe subscribe to current discussion posts

Contacts

[讨论]: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 4203 (Thread-32)

你好,ruki:

我想在android里面使用tbox的http功能,目前发现一个问题,操作步骤是这样的:

第一步:关闭wifi开关,并关机
第二步:开机,并打开wifi,接着会自动出发我的程序
第三步:我的程序里面通过tb_http_open发起一个http请求

这是,tb_dns_server_get函数的tb_assertf(ok, "no server!"); 地方会报段错误:

04-28 08:51:24.886: E/tbox(2288): [f36ff930]: [tbox]: [http_option]: option: version: HTTP/1.1
04-28 08:51:24.888: E/tbox(2288): [f36ff930]: [tbox]: [http_option]: option: method: POST
04-28 08:51:24.888: E/tbox(2288): [f36ff930]: [tbox]: [http_option]: option: redirect: 10
04-28 08:51:24.889: E/tbox(2288): [f36ff930]: [tbox]: [http_option]: option: range: 0-0
04-28 08:51:24.889: E/tbox(2288): [f36ff930]: [tbox]: [http_option]: option: bunzip: false
04-28 08:51:24.889: E/tbox(2288): [f36ff930]: [tbox]: [http_option]: 
04-28 08:51:24.889: E/tbox(2288): [f36ff930]: [tbox]: [http]: connect: ..
04-28 08:51:24.889: E/tbox(2288): [f36ff930]: [tbox]: [dns_server]: [warning]: no faster server at tb_dns_server_sort(): 458, src/tbox/network/dns/server.c
04-28 08:51:24.892: E/tbox(2288): [f36ff930]: [tbox]: [dns_server]: [assert]: expr[ok]: no server! at tb_dns_server_get(): 508, src/tbox/network/dns/server.c
04-28 08:51:24.892: E/tbox(2288): [f36ff930]: [tbox]: [dns_server]: [error]: abort at tb_dns_server_get(): 508, src/tbox/network/dns/server.c
04-28 08:51:24.892: E/tbox(2288): --------- beginning of crash
04-28 08:51:24.892: A/libc(2288): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 4203 (Thread-32)
04-28 08:51:25.002: A/AEE/DEBUG(4208): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

注:此贴来自老论坛。。

xmake 使用上的问题(clean,auto rebuild,os.run)

  • xmake clean是怎么用的?为什么不会把build目录删除呢?
  • 而且为什么有的时候修改了代码文件再build不会重新编译呢?
  • 建议on_run等等设置的函数执行前在命令行上打印输出(making target xxx)
    并且在-v模式下os.run自定义命令本身显示出来

tbox windows下编译android版本遇到的问题

checking for the architecture ... armv7-a
checking for the SDK version of NDK ... android-27
checking for the version of toolchains ... 4.9
checking for the posix_getpagesize ... ok
checking for the posix_socket ... ok
checking for the libc_setlocale ... ok
checking for the libc_kill ... ok
checking for the posix_pwritev ... no
checking for the posix_poll ... ok
checking for the libm_atan2 ... ok
checking for the libc_wcsncat ... ok
checking for the polarssl ... no
checking for the posix_execvp ... ok
checking for the posix_fork ... ok
checking for the posix_getifaddrs ... ok
checking for the libc_strcat ... ok
checking for the libc_wcsstr ... ok
checking for the libm_pow ... ok
checking for the libc_memcpy ... ok
checking for the libm_sqrtf ... ok
checking for the libc_wcsnlen ... ok
checking for the libm_acosf ... ok
checking for the libc_strnlen ... ok
checking for the libc_random ... ok
checking for the posix_copyfile ... no
checking for the libm_atanf ... ok
checking for the libc_wcsncpy ... ok
checking for the posix_gethostbyaddr ... ok
checking for the posix_sendfile ... ok
checking for the systemv_semtimedop ... no
checking for the libc_strncmp ... ok
checking for the libc_strncasecmp ... ok
checking for the libc_strlcpy ... ok
checking for the posix_preadv ... no
checking for the posix_stat64 ... ok
checking for the libc_wcscpy ... ok
checking for the libm_tanf ... ok
checking for the libc_strncpy ... ok
checking for the posix_waitpid ... ok
checking for the libc_localtime ... ok
checking for the posix_pread64 ... ok
checking for the posix_sysconf ... ok
checking for the libc_signal ... ok
checking for the libc_strstr ... ok
checking for the libm_log2f ... ok
checking for the libm_fmodf ... ok
checking for the libc_wcstombs ... ok
checking for the posix_regcomp ... ok
checking for the posix_readv ... ok
checking for the wchar ... no
checking for the libm_exp ... ok
checking for the posix_pthread_create ... ok
checking for the libc_setjmp ... ok
checking for the libc_strcasestr ... ok
checking for the posix_posix_spawnp ... no
checking for the libc_mktime ... ok
checking for the libm_acos ... ok
checking for the libc_backtrace ... no
checking for the posix_sched_yield ... ok
checking for the libm_sincosf ... no
checking for the libc_wcscmp ... ok
checking for the posix_fdatasync ... ok
checking for the posix_dlopen ... ok
checking for the posix_regexec ... ok
checking for the posix_vfork ... ok
checking for the libc_mbstowcs ... ok
checking for the posix_writev ... ok
checking for the openssl ... no
checking for the posix_epoll_create ... ok
checking for the systemv_semget ... ok
checking for the zlib ... no
checking for the posix_pthread_key_delete ... ok
checking for the posix_open ... ok
checking for the posix_pthread_key_create ... ok
checking for the libc_gmtime ... ok
checking for the libc_wcscasecmp ... ok
checking for the libm_atan ... ok
checking for the libc_memmove ... ok
checking for the libm_asinf ... ok
checking for the pcre ... no
checking for the libm_sincos ... no
checking for the libc_strcmp ... ok
checking for the libc_strcasecmp ... ok
checking for the posix_pthread_setspecific ... ok
checking for the libc_memset ... ok
checking for the libc_fputs ... ok
checking for the posix_gethostbyname ... ok
checking for the posix_execvpe ... ok
checking for the posix_epoll_wait ... ok
checking for the libc_wcsncasecmp ... ok
checking for the mysql ... no
checking for the libc_strcpy ... ok
checking for the libm_sqrt ... ok
checking for the posix_sem_init ... ok
checking for the libc_wcslen ... ok
checking for the libc_memmem ... ok
checking for the libc_gettimeofday ... ok
checking for the posix_getnameinfo ... ok
checking for the libc_strlen ... ok
checking for the libc_wcslcpy ... ok
checking for the libc_wcscasestr ... no
checking for the libc_wcsncmp ... ok
checking for the libm_log2 ... ok
checking for the libm_cos ... ok
checking for the posix_opendir ... ok
checking for the posix_select ... ok
checking for the libm_sin ... ok
checking for the pcre2 ... no
checking for the libm_tan ... ok
checking for the libc_sigsetjmp ... ok
checking for the libc_memcmp ... ok
checking for the libc_wcscat ... ok
checking for the posix_gethostname ... ok
checking for the mbedtls ... no
checking for the libm_sinf ... ok
checking for the libm_fmod ... ok
checking for the sqlite3 ... no
checking for the posix_pthread_mutex_init ... ok
checking for the libm_asin ... ok
checking for the libm_expf ... ok
checking for the libm_atan2f ... ok
checking for the posix_pwrite64 ... ok
checking for the posix_getaddrinfo ... ok
checking for the libm_cosf ... ok
checking for the libc_strncat ... ok
checking for the posix_pthread_getspecific ... ok
checking for the libc_srandom ... ok
checking for the libm_powf ... ok
checking for the posix_getrlimit ... ok
checking for the posix_getdtablesize ... no

error: src\tbox\platform\linux/poller_epoll.c:91:5: error: implicit declaration of function 'sysconf' [-Werror=implicit-function-declaration]
if (!maxfds) maxfds = sysconf(_SC_OPEN_MAX);
^
src\tbox\platform\linux/poller_epoll.c:91:35: error: '_SC_OPEN_MAX' undeclared (first use in this function)
if (!maxfds) maxfds = sysconf(_SC_OPEN_MAX);
^
src\tbox\platform\linux/poller_epoll.c:91:35: note: each undeclared identifier is reported only once for each function it appears in
src\tbox\platform\linux/poller_epoll.c: In function 'tb_poller_exit':
src\tbox\platform\linux/poller_epoll.c:221:5: error: implicit declaration of function 'close' [-Werror=implicit-function-declaration]
if (poller->epfd > 0) close(poller->epfd);
^
cc1.exe: all warnings being treated as errors

请问如何解决,谢谢

怎么编译tbox Android版本动态库

xmake f -p android --ndk=...--mode="debug" --kind="shared"
xmake
编译还是 .a的静态库。

修改 ./src/xmake.lua 文件 set_kind("shared")

xmake 出错:
[100%]: linking.debug libtbox.so
error: d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/w
indows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-a
ndroideabi/bin/ld.exe: error: build\.objs\tbox\src\tbox\platform\android\
backtrace.c.o: multiple definition of 'tb_backtrace_frames'
d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-
x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androide
abi/bin/ld.exe: build\.objs\tbox\src\tbox\platform\backtrace.c.o: previous
definition here
d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-
x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androide
abi/bin/ld.exe: error: build\.objs\tbox\src\tbox\platform\android\backtra
ce.c.o: multiple definition of 'tb_backtrace_symbols_init'
d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-
x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androide
abi/bin/ld.exe: build\.objs\tbox\src\tbox\platform\backtrace.c.o: previous
definition here
d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-
x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androide
abi/bin/ld.exe: error: build\.objs\tbox\src\tbox\platform\android\backtra
ce.c.o: multiple definition of 'tb_backtrace_symbols_name'
d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-
x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androide
abi/bin/ld.exe: build\.objs\tbox\src\tbox\platform\backtrace.c.o: previous
definition here
d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-
x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androide
abi/bin/ld.exe: error: build\.objs\tbox\src\tbox\platform\android\backtra
ce.c.o: multiple definition of 'tb_backtrace_symbols_exit'
d:/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-
.....

新手使用box协程

我是一个刚刚接触tbox新手,想请问一下tbox中的协程是否支持像libgo中的:
“支持多线程调度协程,极易编写并行代码,高效的并行调度算法,可以有效利用多个CPU核心”

[share]: A make-like build utility based on Lua

A make-like build utility based on Lua

Build Status Build status Join the chat at https://gitter.im/tboox/tboox donate

logo

Introduction (中文)

xmake is a make-like build utility based on lua.

The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...),
so that any developer can quickly pick it up and enjoy the productivity boost when developing and building project.

If you want to known more, please refer to:

Simple description

target("console")
    set_kind("binary")
    add_files("src/*.c") 

Build project

$ xmake

Run target

$ xmake run console

Debug target

$ xmake run -d console

Support features

  • Tasks
  • Macros
  • Actions
  • Options
  • Plugins
  • Templates

Support platforms

  • Windows (x86, x64, amd64, x86_amd64)
  • Macosx (i386, x86_64)
  • Linux (i386, x86_64, cross-toolchains ...)
  • Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)
  • iPhoneOS (armv7, armv7s, arm64, i386, x86_64)
  • WatchOS (armv7k, i386)
  • Mingw (i386, x86_64)

Support Languages

  • C/C++
  • Objc/Objc++
  • Swift
  • Assembly
  • Golang
  • Rust
  • Dlang

Builtin Plugins

  • Macros script plugin
  • Run the custom lua script plugin
  • Generate IDE project file plugin(makefile, vs2002 - vs2017 .. )
  • Generate doxygen document plugin
  • Convert .app to .ipa plugin

Examples

usage_demo

Create a c++ console project:

    xmake create -l c++ -t 1 console
 or xmake create --language=c++ --template=1 console

Project xmakefile: xmake.lua

target("console")
    set_kind("binary")
    add_files("src/*.c") 

Configure project:

This is optional, if you compile the targets only for linux, macosx and windows and the default compilation mode is release.

   xmake f -p iphoneos -m debug
or xmake f --plat=macosx --arch=x86_64
or xmake f -p windows
or xmake config --plat=iphoneos --mode=debug
or xmake config --plat=android --arch=armv7-a --ndk=xxxxx
or xmake config -p linux -a i386
or xmake config -p mingw --cross=i386-mingw32- --toolchains=/xxx/bin
or xmake config -p mingw --sdk=/mingwsdk
or xmake config --help

Compile project:

   xmake
or xmake -r
or xmake --rebuild

Run target:

   xmake r console
or xmake run console

Debug target:

   xmake r -d console
or xmake run -d console

Package all:

   xmake p
or xmake package
or xmake package console
or xmake package -o /tmp
or xmake package --output=/tmp

Package all archs using macro:

   xmake m package 
or xmake m package -p iphoneos
or xmake m package -p macosx -f "-m debug" -o /tmp/
or xmake m package --help

Install targets:

   xmake i
or xmake install
or xmake install console
or xmake install -o /tmp
or xmake install --output=/tmp

If you need known more detailed usage,please refer to documents
or run:

   xmake -h
or xmake --help
or xmake config --help
or xmake package --help
or xmake macro --help
...

The simple xmake.lua file:

-- the debug mode
if is_mode("debug") then
    
    -- enable the debug symbols
    set_symbols("debug")

    -- disable optimization
    set_optimize("none")
end

-- the release mode
if is_mode("release") then

    -- set the symbols visibility: hidden
    set_symbols("hidden")

    -- enable fastest optimization
    set_optimize("fastest")

    -- strip all symbols
    set_strip("all")
end

-- add target
target("test")

    -- set kind
    set_kind("static")

    -- add files
    add_files("src/*.c") 

If you want to know more, please refer to:

Documents

Projects

Some projects using xmake:

Contacts

欢迎来到TBOOX开源技术交流社区

技术交流

  • C/C++/Lua语言
  • 跨平台开发
  • TBOOX开源项目

社区导航

发帖规范

  • 发帖标题以:[讨论], [提问], [分享], [求助] 开头,例如:[讨论]:XXX
  • Watch接受最新社区动态,Subscribe订阅当前讨论帖消息

联系方式

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.