Page 1 of 1

[SOLVED] Unresolved external function '__imp____iob_func'.

Posted: Tue Nov 27, 2018 8:53 am
by IceSoft
I compile the same source as x86 and as x64.

x64 is compiling and linking very well. Executable (debug/release) is working of course.

But the x86 version (debug/release) has an linker error.
Is PB x86 compiled with an older/different linker/compiler as x64?
******************************************
PureBasic 5.70 LTS beta 3 (Windows - x86)
******************************************

Compiling ..\..\Chipmunk2D_Demos\Chipmunk2D4PB_Demo_20181029.pb
Loading external libraries...
Starting compilation...
Including source: .\include\Chipmunk2D4PB.pbi
Including source: .\Chipmunk4PB_Resident.pbi
Including source: .\Demos\PinBall.pbi
Including source: .\Demos\Plink.pbi
Including source: .\Demos\GrainsDeSable.pbi
Including source: .\Demos\GravityBounce.pbi
1869 lines processed.
Creating executable "..\Chipmunk2D4PB_Demo_20181029_x86.exe".
Error: Linker
POLINK: error: Unresolved external symbol '__imp____iob_func'. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
POLINK: fatal error: 1 unresolved external(s).
******************************************
PureBasic 5.70 LTS beta 3 (Windows - x64)
******************************************

Compiling ..\..\Chipmunk2D_Demos\Chipmunk2D4PB_Demo_20181029.pb
Loading external libraries...
Starting compilation...
Including source: .\include\Chipmunk2D4PB.pbi
Including source: .\Chipmunk4PB_Resident.pbi
Including source: .\Demos\PinBall.pbi
Including source: .\Demos\Plink.pbi
Including source: .\Demos\GrainsDeSable.pbi
Including source: .\Demos\GravityBounce.pbi
1869 lines processed.
Creating executable "..\Chipmunk2D4PB_Demo_20181029_x64d.exe".

- Feel the ..PuRe.. Power -

Re: [5.70b3 x86] Unresolved external symbol '__imp____iob_fu

Posted: Tue Nov 27, 2018 10:21 am
by Fred
You need to compile your lib with a special flag for x86, you can look in the makefile of the SDK IIRC. It's not a PB bug.

Re: [5.70b3 x86] Unresolved external symbol '__imp____iob_fu

Posted: Tue Nov 27, 2018 11:48 am
by IceSoft
Fred wrote:You need to compile your lib with a special flag for x86, you can look in the makefile of the SDK IIRC. It's not a PB bug.
I know:
That are the additional preprocessor flags for x86:
X86;VISUALC;WINDOWS;UNICODE

and thats for x64:
X64;VISUALC;WINDOWS;UNICODE

I will make some more tests.

Re: [5.70b3 x86] Unresolved external symbol '__imp____iob_fu

Posted: Tue Nov 27, 2018 4:47 pm
by Fred

Re: [5.70b3 x86] Unresolved external symbol '__imp____iob_fu

Posted: Tue Nov 27, 2018 5:09 pm
by IceSoft
Ok it compiles now:
******************************************
PureBasic 5.70 LTS beta 3 (Windows - x86)
******************************************

Compiling ..\..\Chipmunk2D_Demos\Chipmunk2D4PB_Demo_20181029.pb
Loading external libraries...
Starting compilation...
Including source: .\include\Chipmunk2D4PB.pbi
Including source: .\Chipmunk4PB_Resident.pbi
Including source: .\Demos\PinBall.pbi
Including source: .\Demos\Plink.pbi
Including source: .\Demos\GrainsDeSable.pbi
Including source: .\Demos\GravityBounce.pbi
1869 lines processed.
Creating executable "..\Chipmunk2D4PB_Demo_20181029_x86.exe".

- Feel the ..PuRe.. Power -
******************************************
PureBasic 5.70 LTS beta 3 (Windows - x64)
******************************************

Compiling ..\..\Chipmunk2D_Demos\Chipmunk2D4PB_Demo_20181029.pb
Loading external libraries...
Starting compilation...
Including source: .\include\Chipmunk2D4PB.pbi
Including source: .\Chipmunk4PB_Resident.pbi
Including source: .\Demos\PinBall.pbi
Including source: .\Demos\Plink.pbi
Including source: .\Demos\GrainsDeSable.pbi
Including source: .\Demos\GravityBounce.pbi
1869 lines processed.
Creating executable "..\Chipmunk2D4PB_Demo_20181029_x64.exe".

- Feel the ..PuRe.. Power -