problem compiling a console application on linux mint

Linux specific forum
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

problem compiling a console application on linux mint

Post 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...
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: problem compiling a console application on linux mint

Post 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?
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: problem compiling a console application on linux mint

Post 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?
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: problem compiling a console application on linux mint

Post by mk-soft »

Usually nothing. Except if you use GTK2 or QT. Unfortunately, Webkit still doesn't work (WebGadget).

See:
Simple install ...
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply