flat assembler
Message board for the users of flat assembler.

Index > Linux > New to Linux and New to FASM

Author
Thread Post new topic Reply to topic
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 15 Apr 2008, 21:11
Hello,

After twenty years programming under dos and Windows I decided to leave them for Linux.
I was programming with MASM and now I choose FASM.

I have just downloaded FASM and I am trying to compile GTK examples but I get a lot of errors.

Messages are "undefined reference to gtk_combo_new", but there are many other errors messages such this one.

What is the solution ?

Embarassed Embarassed

_________________
____________Kenavo_________________

Grincheux
Post 15 Apr 2008, 21:11
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 15 Apr 2008, 22:07
hmm... looks like you are not linking the GTK library properly. what commands do you use to build the executable?
Post 15 Apr 2008, 22:07
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 16 Apr 2008, 09:48
I just use make.

I use FEDORA and did not see the GTK library, this afternoon I will try to download and install this package.

Thanks

_________________
____________Kenavo_________________

Grincheux
Post 16 Apr 2008, 09:48
View user's profile Send private message Reply with quote
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 16 Apr 2008, 19:59
I have installed GTK and get the following messages...

[root@Grincheux gtk-combo]# make
gcc -Wall -s -O3 combo.o -o combo `gtk-config --cflags` `gtk-config --libs`
/bin/sh: gtk-config: command not found
/bin/sh: gtk-config: command not found
/usr/bin/ld: i386 architecture of input file `combo.o' is incompatible with i386:x86-64 output
combo.o: In function `main':
(.text+0xc): undefined reference to `gtk_init'
combo.o: In function `main':
(.text+0x16): undefined reference to `gtk_window_new'

GTK is in usr/bin

MayDay..MayDay..MayDay..MayDay..MayDay..MayDay..MayDay..MayDay..MayDay..
Post 16 Apr 2008, 19:59
View user's profile Send private message Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 16 Apr 2008, 22:46
Quote:
i386 architecture of input file `combo.o' is incompatible with i386:x86-64 output
It looks like you're trying to combine 32-bit and 64-bit code, why would you even try that?
Post 16 Apr 2008, 22:46
View user's profile Send private message Visit poster's website Reply with quote
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 17 Apr 2008, 08:00
I try to write my own programs using FASM on FEDORA with the 64 bits edition. I need examples. I understood that I was combinig the 32/64 bits code.

How can I do to create programs using GNOME, KDE or GTK with FASM and where can I get sources examples ?

That's all

Thanks every one for your help
Post 17 Apr 2008, 08:00
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 17 Apr 2008, 08:28
i am not really sure, but you need some cross-architecture compilation tools (is this included in distribution by default? dunno), and 32bit development version of gtk, not 64bit version

personally i prefer trying this on 32bit linux Wink
Post 17 Apr 2008, 08:28
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 17 Apr 2008, 11:58
The best thing I have to do is to remove my 64bits version and install the 32 bits version for trying to write asm programs..... in console. Windows was simplier... Even for asm programmers.

Can you confirm that if I have a 32 bits linux I can compile and run the gtk-examples found in fasm.


I have choosen FASM because its syntaxe was near from MASM, in that case I just had to thing about the pgm I want/try to write.

Thanks
Post 17 Apr 2008, 11:58
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 17 Apr 2008, 13:07
with 32bit linux you should be able to compile them
Post 17 Apr 2008, 13:07
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 17 Apr 2008, 13:44
Quote:
with 32bit linux you should be able to compile them
Just make sure you compile the code in the LINUX folder, and good luck.
Post 17 Apr 2008, 13:44
View user's profile Send private message Visit poster's website Reply with quote
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 17 Apr 2008, 14:30
Thanks for your help. I download a 32 bits Fedora Distrib and give you my feedback.

"Grincheux" means "The one who never is pleased"... and my advice is "Never be pleased, always improve"...

No comment
Post 17 Apr 2008, 14:30
View user's profile Send private message Reply with quote
mattst88



Joined: 12 May 2006
Posts: 260
Location: South Carolina
mattst88 17 Apr 2008, 14:32
The -m32 flag will compile/link code for 32-bit x86 (ie, not x86-64), but you'd also need 32-bit GTK+.
Post 17 Apr 2008, 14:32
View user's profile Send private message Visit poster's website Reply with quote
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 18 Apr 2008, 10:49
Now I have installed Fedora 32 bits, and now fasm GTK examples can be compiled. Here is the log the command I passed to install GTK. If this could help someone :

THE COMMANDS TO ENTER INTO TERMINAL :

yum install gnome-libs gtk+ glib
yum install gnome-libs-devel gtk+-devel glib-devel

I FOUND THESE AT

http://www.jimbrooks.org/web/hypersrc/hypersrc.php

HERE IS THE RESULT

========================= RESULTAT ============================================

[Grincheux@localhost ~]$ su
Mot de passe :
[root@localhost Grincheux]# yum install gnome-libs gtk+ glib
Setting up Install Process
Parsing package install arguments
Package gtk+ - 1:1.2.10-59.fc8.i386 is already installed.
Package glib - 1:1.2.10-28.fc8.i386 is already installed.
Resolving Dependencies
--> Running transaction check
---> Package gnome-libs.i386 1:1.4.2-7.fc8 set to be updated
--> Processing Dependency: libORBitutil.so.0 for package: gnome-libs
--> Processing Dependency: libORBitCosNaming.so.0 for package: gnome-libs
--> Processing Dependency: libIIOP.so.0 for package: gnome-libs
--> Processing Dependency: libpng.so.2 for package: gnome-libs
--> Processing Dependency: libORBit.so.0 for package: gnome-libs
--> Running transaction check
---> Package ORBit.i386 1:0.5.17-22.fc8 set to be updated
---> Package libpng10.i386 0:1.0.30-1.fc8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
gnome-libs i386 1:1.4.2-7.fc8 updates 1.1 M
Installing for dependencies:
ORBit i386 1:0.5.17-22.fc8 fedora 349 k
libpng10 i386 1.0.30-1.fc8 fedora 123 k

Transaction Summary
=============================================================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): gnome-libs-1.4.2-7 100% |=========================| 1.1 MB 00:11
(2/3): libpng10-1.0.30-1. 100% |=========================| 123 kB 00:01
(3/3): ORBit-0.5.17-22.fc 100% |=========================| 349 kB 00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libpng10 ######################### [1/3]
Installing: ORBit ######################### [2/3]
Installing: gnome-libs ######################### [3/3]

Installed: gnome-libs.i386 1:1.4.2-7.fc8
Dependency Installed: ORBit.i386 1:0.5.17-22.fc8 libpng10.i386 0:1.0.30-1.fc8
Complete!
[root@localhost Grincheux]# yum install gnome-libs-devel gtk+-devel glib-devel
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package gtk+-devel.i386 1:1.2.10-59.fc8 set to be updated
---> Package gnome-libs-devel.i386 1:1.4.2-7.fc8 set to be updated
--> Processing Dependency: ORBit-devel for package: gnome-libs-devel
--> Processing Dependency: imlib-devel for package: gnome-libs-devel
---> Package glib-devel.i386 1:1.2.10-28.fc8 set to be updated
--> Running transaction check
---> Package ORBit-devel.i386 1:0.5.17-22.fc8 set to be updated
---> Package imlib-devel.i386 1:1.9.15-6.fc8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
gnome-libs-devel i386 1:1.4.2-7.fc8 updates 500 k
Installing for dependencies:
ORBit-devel i386 1:0.5.17-22.fc8 fedora 196 k
glib-devel i386 1:1.2.10-28.fc8 fedora 39 k
gtk+-devel i386 1:1.2.10-59.fc8 fedora 355 k
imlib-devel i386 1:1.9.15-6.fc8 updates 109 k

Transaction Summary
=============================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): glib-devel-1.2.10- 100% |=========================| 39 kB 00:00
(2/5): imlib-devel-1.9.15 100% |=========================| 109 kB 00:00
(3/5): gnome-libs-devel-1 100% |=========================| 500 kB 00:06
(4/5): ORBit-devel-0.5.17 100% |=========================| 196 kB 00:02
(5/5): gtk+-devel-1.2.10- 100% |=========================| 355 kB 00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: glib-devel ######################### [1/5]
Installing: ORBit-devel ######################### [2/5]
Installing: gtk+-devel ######################### [3/5]
Installing: imlib-devel ######################### [4/5]
Installing: gnome-libs-devel ######################### [5/5]

Installed: gnome-libs-devel.i386 1:1.4.2-7.fc8
Dependency Installed: ORBit-devel.i386 1:0.5.17-22.fc8 glib-devel.i386 1:1.2.10-28.fc8 gtk+-devel.i386 1:1.2.10-59.fc8 imlib-devel.i386 1:1.9.15-6.fc8
Complete!
[root@localhost Grincheux]#
Post 18 Apr 2008, 10:49
View user's profile Send private message Reply with quote
Grincheux



Joined: 15 Apr 2008
Posts: 17
Location: Mathenay, France
Grincheux 18 Apr 2008, 10:59
The examples are well choosen and now I am going to study them to learn how to make a window.

All the examples are running, now I can write my own asm code,

I am very pleased, thanks everyone
Post 18 Apr 2008, 10:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.