lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.13k stars 355 forks source link

helloworld demo instantly exiting #139

Closed rverton closed 6 years ago

rverton commented 6 years ago

When running the demo helloworld application, no windows is opened and it exits instantly after some log messages.

Reproduction Steps:

  1. cd test/
  2. make clean && make
  3. ./helloworld
$ ./helloworld
LCUI (LC's UI) version 1.0.0
Build at Feb  8 2018 - 09:18:32
Copyright (C) 2012-2018 Liu Chao <root@lc-soft.io>.
This is free software, licensed under GPLv2. 
See source distribution for detailed copyright notices.
To learn more, visit http://www.lcui.org.

[font] load file: in-core.inconsolata
[font] add family: inconsolata, style name: Regular, id: 1
[font] current font engine is: FreeType
[font] load file: /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
[font] add family: Ubuntu, style name: Regular, id: 2
[font] load file: /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc
[font] add family: Noto Sans CJK JP, style name: Regular, id: 3
[font] add family: Noto Sans CJK KR, style name: Regular, id: 4
[font] add family: Noto Sans CJK SC, style name: Regular, id: 5
[font] add family: Noto Sans CJK TC, style name: Regular, id: 6
[font] add family: Noto Sans Mono CJK JP, style name: Regular, id: 7
[font] add family: Noto Sans Mono CJK KR, style name: Regular, id: 8
[font] add family: Noto Sans Mono CJK SC, style name: Regular, id: 9
[font] add family: Noto Sans Mono CJK TC, style name: Regular, id: 10
[font] load file: /usr/share/fonts/opentype/noto/NotoSansCJK.ttc
[font] failed to load file: /usr/share/fonts/opentype/noto/NotoSansCJK.ttc
[font] load file: /usr/share/fonts/truetype/wqy/wqy-microhei.ttc
[font] failed to load file: /usr/share/fonts/truetype/wqy/wqy-microhei.ttc
[font] select: Noto Sans CJK SC
[timer] init ...
[timer] timer thread is working
[worker] worker 3152299776 is running
[worker] worker 3143907072 is running
[worker] worker 3135514368 is running
[worker] worker 3127121664 is running
[display] init ...
[display] init ok, driver name: x11
[builder] warning: this module is not enabled before build.
$

LCUI version: 1.0.0 (latest git version) OS and version: Ubuntu 17.10, i3wm Build tools: gcc

lc-soft commented 6 years ago

[builder] warning: this module is not enabled before build.

Do you have installed libxml-dev ?

rverton commented 6 years ago

There is no libxml-dev available here, but libxml2-dev is installed.

lc-soft commented 6 years ago

What the ./configure result? is it the same as below?

Build with lcui-builder support .... : yes
Build with libpng support .......... : yes
Build with libjpeg support ......... : yes
Build with font-engine support ..... : freetype2
Build with thread support .......... : pthread
Build with video support ........... : x11
rverton commented 6 years ago

Yes, it's the same.

lc-soft commented 6 years ago

You can add #define USE_LCUI_BUILDER 1 to include/config.h

rverton commented 6 years ago

I only have an include/LCUI/config.h file where this line is already in.

lc-soft commented 6 years ago

Are you rebuild LCUI ?

./configure
make clean
make
cd test
make
./helloworld
rverton commented 6 years ago

Works now, thanks!