flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 03 Aug 2016, 10:12
Probably you are trying to link 32bit executable with 64bit linker. There should be some magic options to switch the target CPU.
Also, imho for assembly language programs it is better to use directly the linker ld, instead of the C++ compiler gcc. |
|||
![]() |
|
dstyl 03 Aug 2016, 12:53
JohnFound wrote: Probably you are trying to link 32bit executable with 64bit linker. There should be some magic options to switch the target CPU. Can you please post the cmd for ld, would help me a lot and thanks for your answer. |
|||
![]() |
|
JohnFound 03 Aug 2016, 12:57
I am using FASM to generate directly the executable files and hate the linkers since my childhood.
![]() |
|||
![]() |
|
Melissa 04 Aug 2016, 23:56
try gcc -m32 ...
|
|||
![]() |
|
dstyl 05 Aug 2016, 08:07
I get
/usr/bin/ld: cannot find -lgcc /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status from gcc -m32 libcdemo.o -o libcdemo |
|||
![]() |
|
redsock 05 Aug 2016, 08:45
FYI, depending on your linux distro and whatever package manager you use, there are 32bit compat goods that are needed. I happily run openSUSE Leap, and using its package manager, if I search for gcc I see the following tidbits that would fix your -lgcc:
i | libgcc_s1-32bit | C compiler runtime library | package There are likely other similar 32bit library requirements but that is the one your output is complaining about. |
|||
![]() |
|
dstyl 05 Aug 2016, 09:02
I have libgcc4.9 installed, it still searches for lgcc, i have linux mint as distro.
I get the same problem with nasm and ld -s -o xy xy.o |
|||
![]() |
|
Endre 05 Aug 2016, 17:48
What if you install lib32gcc-4.9-dev? I guess it pulls every necessary depending package as well, so don't be scared looking at the list of packages being installed
![]() Last edited by Endre on 10 Dec 2016, 22:15; edited 1 time in total |
|||
![]() |
|
system error 18 Aug 2016, 19:09
I remember this problem. I don't know about Mint, but in Ubuntu you need to install "g++-multilib libc6-dev-i386" before you can use that -m32 switch.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.