Missing liblto_plugin_0.dll ?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Lord
Addict
Addict
Posts: 907
Joined: Tue May 26, 2009 2:11 pm

Missing liblto_plugin_0.dll ?

Post by Lord »

Hi!

I tried to compile a short program using this line in a batch file
gcc "purebasic.c" -o "gccShowVideo.exe" -O3
The result was a fatal error after some warnings
gcc: fatal error: -fuse-linker-plugin, but liblto_plugin-0.dll not found
compilation terminated.
This DLL is not found on my computer.
The program compiles and runs fine with asm and C back end in debug mode
and as an *.exe.
Where do I get this DLL and where to put it?
Image
infratec
Always Here
Always Here
Posts: 7613
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Missing liblto_plugin_0.dll ?

Post by infratec »

the name is listed inside of gcc.exe
But I have no idea which function requires this dll.
It's included in the mingw-base packet.
User avatar
idle
Always Here
Always Here
Posts: 5888
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Missing liblto_plugin_0.dll ?

Post by idle »

I don't think you can compile from the purebasic.c file directly with gcc. The pbcompiler needs to extract the pb libries so they can get linked.
#NULL
Addict
Addict
Posts: 1499
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Missing liblto_plugin_0.dll ?

Post by #NULL »

I think it's required by the linker for some optimizations.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: Missing liblto_plugin_0.dll ?

Post by chi »

You could try -fno-use-linker-plugin, but without the PB libraries you'll not be able to create an executable file.
Et cetera is my worst enemy
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Missing liblto_plugin_0.dll ?

Post by ChrisR »

A workaround, not really nice... (I or you can delete this post if it is annoying)

Code: Select all

; -----------------------------------------------------------------------------
; polink.pb Beta!
; Get Compilation cmdlines via a fake polink.exe:
; -----------------------------------------------------------------------------
; Adapt the gcc switches to your needs and compile it in your folder in: polink.exe
; In PureBasic_6.00_x64\Compilers, save, rename polink.exe to polinkorg.exe then copy your Fake polink.exe in PureBasic_6.00_x64\Compilers 
; Then Create your executable, the Compilation cmdlines will be copied to the clipboard. To be used in cmd.exe before closing the Message Requester.
; Do not forget to restore polinkorg.exe to polink.exe when you no longer need it
; -----------------------------------------------------------------------------

Filename$ = ProgramFilename()
If FileSize(GetPathPart(Filename$) + "\" + GetFilePart(Filename$, #PB_FileSystem_NoExtension) + "org.exe") > 0
  CountParam = CountProgramParameters()
  For I=0 To CountParam-1
    PgmParam$ + ProgramParameter(I) + " "
  Next
  
  SetClipboardText("Cd /D " + GetCurrentDirectory() +#CRLF$+ 
                   "PATH=%PATH%;" + GetPathPart(Filename$) +#CRLF$+
                   "gcc.exe -O3 -Wno-incompatible-pointer-types -Wno-overflow -Wno-int-conversion -c -o PureBasic.obj purebasic.c" +#CRLF$+
                   GetFilePart(Filename$, #PB_FileSystem_NoExtension) + "org.exe " + PgmParam$ +#CRLF$+ "")
  
  MessageRequester("Compilation cmdlines", "Compilation cmdlines copied to the clipboard." +#CRLF$+#CRLF$+ "To be used in cmd.exe before closing this window")
EndIf
User avatar
Lord
Addict
Addict
Posts: 907
Joined: Tue May 26, 2009 2:11 pm

Re: Missing liblto_plugin_0.dll ?

Post by Lord »

Thanks for all your answers.

So it's just a c hype. Nothing for PureBasic users.
It seems, there is no benefit in speed or size.
At least in my projects there is no noticable improvement
from asm to c back end. And using gcc is a nogo.
Image
AndyMK
Enthusiast
Enthusiast
Posts: 582
Joined: Wed Jul 12, 2006 4:38 pm
Location: UK

Re: Missing liblto_plugin_0.dll ?

Post by AndyMK »

I think the main point of the c compiler is to reach more platforms
Post Reply