flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound
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
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
I am using FASM to generate directly the executable files and hate the linkers since my childhood.
![]() |
|||
![]() |
|
Melissa
try gcc -m32 ...
|
|||
![]() |
|
dstyl
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
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
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
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
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.