Hello:
I made a personal lib, and compiled it with TailBite, everything was OK until recently, when I choose backend-C as compiler, I got error on every line including a procedure of my lib: error: Unresolved external symbol...., POLINK error: Unresolved external symbol....etc
is this normal? is there any trick to resolve it?
Thank you
PB backend-C no more compatible with Tailbite?
Moderators: gnozal, ABBKlaus, lexvictory
PB backend-C no more compatible with Tailbite?
PureBasic: Surprisingly simple, diabolically powerful
Re: PB backend-C no more compatible with Tailbite?
Tailbite is not an official tool, and cannot be used to create a static lib for a C compiler.
I didn't use Tailbite for the last decade or so, but (as far as I remember) Tailbite creates a file that has ASM style symbols which are not compatible with C style symbols.
What would need to be done is to intercept gcc calls and implement the creation of static libs for later use.
You can take a look at Idle's code: include c headers and modify compiler flags with inline c
Idle's intention differs from yours, but the approach would be the same.
Of course it would be even better if Fred & Co. would implement the creation of static libs right into the PB compiler functionality...
I didn't use Tailbite for the last decade or so, but (as far as I remember) Tailbite creates a file that has ASM style symbols which are not compatible with C style symbols.
What would need to be done is to intercept gcc calls and implement the creation of static libs for later use.
You can take a look at Idle's code: include c headers and modify compiler flags with inline c
Idle's intention differs from yours, but the approach would be the same.
Of course it would be even better if Fred & Co. would implement the creation of static libs right into the PB compiler functionality...

I am to provide the public with beneficial shocks.
Alfred Hitshock
Re: PB backend-C no more compatible with Tailbite?
Rather than making a static lib we could do the same as a precompiled object there's really no difference
https://www.purebasic.fr/english/viewto ... 40#p581840
https://www.purebasic.fr/english/viewto ... 40#p581840
Re: PB backend-C no more compatible with Tailbite?
Thank you both
yes I'll try idle method
yes I'll try idle method
PureBasic: Surprisingly simple, diabolically powerful
Re: PB backend-C no more compatible with Tailbite?
I haven't automated the making the objects yet but you can experiment, I only did it on the PI so far, windows is more tricky than linux..
I will try and get the tool working but like I said it needs some discussion as it's not cut and dry there will be linking issues to resolve with the precompiled object stategy.
I will try and get the tool working but like I said it needs some discussion as it's not cut and dry there will be linking issues to resolve with the precompiled object stategy.
Re: PB backend-C no more compatible with Tailbite?
For anyone interested this might be a solution:
https://www.purebasic.fr/english/viewtopic.php?t=79286
https://www.purebasic.fr/english/viewtopic.php?t=79286
Re: PB backend-C no more compatible with Tailbite?
Automated tool to create static lib for windows, note static lib produced is only valid for use with PB as it relies on you main program to initialize the the PB objects and link in the runtime.
https://www.purebasic.fr/english/viewtopic.php?t=79332
https://www.purebasic.fr/english/viewtopic.php?t=79332