Page 1 of 1

problem compiling a console application on linux mint

Posted: Tue Nov 16, 2021 5:23 am
by skinkairewalker
i am creating some terminal app on Linux Mint 20, but when i compile, show this error :
I checked all the functions to see if there isn't one that calls a window, but it doesn't, how do I solve this?

Code: Select all

/usr/bin/ld: Window.a(Window.o): on function "PB_Window_FlushEvents":
Window.c:(.text+0x13): reference not set to "gtk_main_iteration_do"
/usr/bin/ld: Window.c:(.text+0x18):  reference not set to "gtk_events_pending"
/usr/bin/ld: Window.a(Window.o): on function "PB_CloseWindow":
Window.c:(.text+0x62): reference not set to "gtk_widget_get_type"
/usr/bin/ld: Window.c:(.text+0x6e): reference not set to "g_type_check_instance_cast"
/usr/bin/ld: Window.c:(.text+0x76): reference not set to "gtk_widget_destroy"
...
collect2: error: ld returned 1 exit status
on compiler options, in executable format I set it to : Console, and it still shows the error...

Re: problem compiling a console application on linux mint

Posted: Tue Nov 16, 2021 7:12 pm
by mk-soft
There must be a command somewhere that requires GUI. A WaitWindowEvent or something similar is enough.

Minimal code

Code: Select all

OpenConsole()

Print("Press Enter!")
Input()

CloseConsole()
Possibly also an external library

Question?

Why can't I just start the console programme from PB-IDE under Mint 20, like with Ubuntu?

Re: problem compiling a console application on linux mint

Posted: Thu Nov 18, 2021 12:40 am
by skinkairewalker
Awesome !!
thanks !

i remove commands related to Usage PNGDecoder() and it worked !!

which libraries do I need to install on my client's computer (linux) so that he can use console applications made in purebasic?

Re: problem compiling a console application on linux mint

Posted: Thu Nov 18, 2021 7:39 pm
by mk-soft
Usually nothing. Except if you use GTK2 or QT. Unfortunately, Webkit still doesn't work (WebGadget).

See:
Simple install ...