ld.exe cannot find...

New to FreeBASIC? Post your questions here.
Post Reply
caffey
Posts: 2
Joined: Nov 06, 2017 8:25

ld.exe cannot find...

Post by caffey »

I'm a noob to FreeBASIC and I've been following the tutorial on this website
http://zetcode.com/gui/fbgtk/

but I keep getting these compile errors and I'm just not sure what I am doing wrong

C:\FreeBASIC\fbc -s console "firstWindow.bas"
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lgtk-win32-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lgdk-win32-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lgio-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lgobject-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lglib-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lgthread-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lgmodule-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lcairo
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lpango-1.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lgdk_pixbuf-2.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -lpangocairo-1.0
C:\FreeBASIC\bin\win64\ld.exe: cannot find -latk-1.0

Build error(s)

Any help would be greatly appreciated
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: ld.exe cannot find...

Post by MrSwiss »

Instead of asking "the obvious", read current threads, dealing with exactly the same "problem".
It is a major problem, that beginners think, they don't need to read the FB-Manual.
(A lot of effort has gone into that, to help avoid, exactly this kind of regularly, reoccurring question(s).)
wxWigets ...
Libgobject ...
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: ld.exe cannot find...

Post by St_W »

Welcome to the forums and sorry for the a bit harsh answer - it's because we get that very same question quite often recently.

Short answer: those libraries ("gtk-win32-2.0.dll", ...) are missing, invalid or cannot be found; you need to download the correct ones (64-bit as far as I can see) and put them somewhere where the linker can find them (e.g. your application's directory).
For more information see the linked threads in the previous answer and especially the documentation.
nimdays
Posts: 236
Joined: May 29, 2014 22:01
Location: West Java, Indonesia

Re: ld.exe cannot find...

Post by nimdays »

@caffey, You can download gtk libs here
caffey
Posts: 2
Joined: Nov 06, 2017 8:25

Re: ld.exe cannot find...

Post by caffey »

Thanks so much for the help
St_W wrote:Welcome to the forums and sorry for the a bit harsh answer - it's because we get that very same question quite often recently.

Short answer: those libraries ("gtk-win32-2.0.dll", ...) are missing, invalid or cannot be found; you need to download the correct ones (64-bit as far as I can see) and put them somewhere where the linker can find them (e.g. your application's directory).

For more information see the linked threads in the previous answer and especially the documentation.
Thanks for the link
nimdays wrote:@caffey, You can download gtk libs here
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: ld.exe cannot find...

Post by St_W »

I've added some additional text and links to the existing FAQ entry and the referred pages
https://freebasic.net/wiki/wikka.php?wa ... FAQ#item25
That could be used as a quick answer for questions like the one in this thread.
satman1w
Posts: 1
Joined: Jul 05, 2021 8:23

Re: ld.exe cannot find...

Post by satman1w »

MrSwiss wrote:Instead of asking "the obvious", read current threads, dealing with exactly the same "problem".
It is a major problem, that beginners think, they don't need to read the FB-Manual.
(A lot of effort has gone into that, to help avoid, exactly this kind of regularly, reoccurring question(s).)
wxWigets ...
Libgobject ...
Let me explain something to you...

When you install 99% of the software in windows, they work out of the box, especially with their own examples... You don't have to download anything because it is already in recent installation pack, you don't have to "compile kernel" or anything else. In most cases the software will check for updates by itself ant that is all. You will find your self reading documentation to resolve complex problems only, not to explore how to start example file, ... (deleted by moderator).

Have a nice day
Last edited by fxm on Jul 05, 2021 14:21, edited 1 time in total.
Reason: End of post suppressed by moderator because highly clashing only.
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: ld.exe cannot find...

Post by deltarho[1859] »

@satman1w

I think that you should be a member of this forum for longer than one day before making judgements on another member's post written three and a half years ago. A lot of water has passed under the bridge in that time.

I would ask you to delete your post and that will be the end of the matter as far as I am concerned, otherwise I will be having a word or two with admin.
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: ld.exe cannot find...

Post by srvaldez »

satman1w looks like BOT to me
Imortis
Moderator
Posts: 1923
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: ld.exe cannot find...

Post by Imortis »

srvaldez wrote:satman1w looks like BOT to me
This looks nothing like a bot to me. Bots often reply to things with no context to what came before. This is just a necro-post.
deltarho[1859] wrote:@satman1w

I think that you should be a member of this forum for longer than one day before making judgements on another member's post written three and a half years ago. A lot of water has passed under the bridge in that time.

I would ask you to delete your post and that will be the end of the matter as far as I am concerned, otherwise I will be having a word or two with admin.
How long a person has been on the forum has little to do with how free they are to speak their mind. If you would like to report the post, please use the report feature and the moderation team will take it into consideration.

I can tell you, from my perspective, there is no reason to delete this post. Other mods may disagree, but I see nothing wrong here.
satman1w wrote: Let me explain something to you...

When you install 99% of the software in windows, they work out of the box, especially with their own examples... You don't have to download anything because it is already in recent installation pack, you don't have to "compile kernel" or anything else. In most cases the software will check for updates by itself ant that is all. You will find your self reading documentation to resolve complex problems only, not to explore how to start example file
You are correct. 99% of windows software does function as expected out of the box. The difference is that this is a compiler, and the example above is using a third party library, which we do not maintain. The point of the examples is to show that the compiler works with common external libraries that are also used with other languages like C.

If we were to make a package with all the external libraries needed for all the examples, it would make a zipped file in the hundreds of megabyes in size. I know this because I made one for myself years ago, when the number of examples and libraries supported was much smaller.

That said, I understand your frustration, but compilers are quite different from other types of software. You will experience the same issue, to bigger or smaller degrees, with C, C++, Python, etc.
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: ld.exe cannot find...

Post by deltarho[1859] »

imortis wrote:I can tell you, from my perspective, there is no reason to delete this post. Other mods may disagree, but I see nothing wrong here.
Firstly, I did not ask admin to delete the post, I asked satman1w.

Secondly, I see less wrong here since fxm's deletion at 14:21 and see no point in reporting a post which has been toned down by another moderator, especially since my comment about "making judgements on another member's post" no longer makes sense.
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: ld.exe cannot find...

Post by jj2007 »

caffey wrote:I'm a noob to FreeBASIC ... I keep getting these compile errors and I'm just not sure what I am doing wrong ... Any help would be greatly appreciated
Imortis wrote:the example above is using a third party library, which we do not maintain
And therefore the linker barks at you, fullstop. That would have been the correct answer. The post of satman1w was a bit over the top, certainly, but look at the first answer and compare it to the second answer by St_W...
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: ld.exe cannot find...

Post by deltarho[1859] »

It is worth noting that the author of the first answer was subject to a temporary suspension a couple of weeks later. In my opinion, the penalty was weak but, nonetheless, it was a penalty. I will put money on it that satman1w was not aware of this, and why I was critical of his making judgements in his first post on this forum. It seems to me that fxm agreed with me, resulting in his "...(deleted by moderator)."

satman1w should do well to read counting_pine's post Forum Policy.

It is also worth noting that caffey only ever made two posts - both in this thread. We cannot draw any conclusions from that - I just thought that it was worth noting.
Post Reply