collect2: cannot find `ld'

Previous topic - Next topic

AndyH

Hi Gernot,

Any idea what's causing this error (I have the latest patch).

There's no indication if it's in my source and as it happens on linking could it be something in GLB?

*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2008.179 - 3D, NET
Wordcount:3328 commands

compiling:

linking:
collect2: cannot find `ld'
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 19.4 sec. Time: 19:36
Build: 0 succeeded.
*** 1 FAILED ***


Kitty Hello

ouch! Is there no file:
GLBasic\compiler\platform\win32\bin\ld.exe

There's something seriously wrong. When did it start? Did you install anything else beside GLBasic?

AndyH

I'd missed a couple of patches and I everything was running ok previously.

Hmmm... I have got that file:

C:\Program Files\GLBasic\Compiler\platform\Win32\Bin\ld.exe

I've recently installed VS2008 but I think that's all.

Kitty Hello

A new install/update didn't help either?

AndyH

No.

I installed v 5.235 from the CD and all my programs worked.  I then did the internet update to the latest version and nothing will compile.  Did you say you upgraded the GCC compiler recently ... could that be something to do with this?

BTW, it does this with anything I try to compile, even just a simple test program...

SETSCREEN 640,480,0
SHOWSCREEN
MOUSEWAIT

Kitty Hello

I installed the very new thing on a PC and did the update, and it worked.
Do you have a copy of MinGW on your computer, maybe?
It's very strange.

AndyH

Ah, it's that MinGW bug again.  If I rename the mingw folder, GLBasic works again. 

Kitty Hello


Schranz0r

I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

AndyH

Any luck with this one?  Still occurs if MINGW folder is not disabled (renamed).  I'm on Vista BTW.

Kitty Hello

it worked for me. What versinn of mingw do you have?

AndyH

Ver 5.1.3.

It looks like 5.1.4 is the latest.  Installing ...

Yay... success.  No more ld errors.

Kitty Hello

aces. I can't seem to get that version to try and fix it...

AndyH

The main thing is that there is a sensible work around, ie: get the latest MinGW.  I don't suppose that will be a problem for most who are still using MinGW 5.1.3 and GLBasic.

r0ber7

#14
I'm having the exact same error message.

collect2: cannot find `ld`

It happens when I try compiling for Linux, or Mac. When I compile for Windows everything works well. I have unzipped the latest Linux and Mac compilers in Compiler/platform/.

I used to have Cygwin installed but that was a long time ago. Never had MinGW installed. ld.exe does exist in the Windows compiler directory.

:doubt:

Can it be a conflict with older GLBasic versions I still have on disk maybe?