POLINK: error: Unresolved external symbol '__imp____iob_func

Windows specific forum
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

POLINK: error: Unresolved external symbol '__imp____iob_func

Post by IceSoft »

Created a staticlib from the Chipmunk 2D physic engine 5.2.0 with VisualStudio 2008.

Using with PB I got this POLINK: error: Unresolved external symbol '__imp____iob_func'.
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Fred
Administrator
Administrator
Posts: 16686
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: POLINK: error: Unresolved external symbol '__imp____iob_func

Post by Fred »

This is not a PureBasic error, you need to patch the lib to remove the iob_func stuff. PB links with an old CRT to be compatiable with former Windows version which doesn't support that. To fix it, add this preprocessor line to your compiler (only on x86):

Code: Select all

/D__iob_func=__p__iob
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

Re: POLINK: error: Unresolved external symbol '__imp____iob_

Post by zxtunes.com »

Fred wrote:This is not a PureBasic error, you need to patch the lib to remove the iob_func stuff. PB links with an old CRT to be compatiable with former Windows version which doesn't support that. To fix it, add this preprocessor line to your compiler (only on x86):

Code: Select all

/D__iob_func=__p__iob

Somebody could solve this problem? :|
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: POLINK: error: Unresolved external symbol '__imp____iob_

Post by IceSoft »

zxtunes.com wrote:
Fred wrote:This is not a PureBasic error, you need to patch the lib to remove the iob_func stuff. PB links with an old CRT to be compatiable with former Windows version which doesn't support that. To fix it, add this preprocessor line to your compiler (only on x86):

Code: Select all

/D__iob_func=__p__iob

Somebody could solve this problem? :|
What want you read?
There are two solutions:
1. The answer from Fred before
2. Or: Fred, dont use any longer outdated/older libs/dll. In this case: an old CRT.
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Fred
Administrator
Administrator
Posts: 16686
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: POLINK: error: Unresolved external symbol '__imp____iob_

Post by Fred »

It's not going to change, just recompile your lib.
cas
Enthusiast
Enthusiast
Posts: 597
Joined: Mon Nov 03, 2008 9:56 pm

Re: POLINK: error: Unresolved external symbol '__imp____iob_

Post by cas »

I have similar problem. I compiled Lua 5.1.4 as static library (with __stdcall calling convention) and almost everything works fine. I get this error when calling luaopen_os() module:
---------------------------
PureBasic - Linker error
---------------------------
POLINK: error: Unresolved external symbol '__imp___difftime64'.

POLINK: error: Unresolved external symbol '__imp___gmtime64'.

POLINK: error: Unresolved external symbol '__imp___localtime64'.

POLINK: error: Unresolved external symbol '__imp___mktime64'.

POLINK: error: Unresolved external symbol '__imp___time64'.

POLINK: fatal error: 5 unresolved external(s).


---------------------------
OK
---------------------------
Does anyone know how to solve this?

Thanks
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: POLINK: error: Unresolved external symbol '__imp____iob_

Post by IceSoft »

@Fred,
Will we get a up-to-date CRT lib with the next PB version?
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: POLINK: error: Unresolved external symbol '__imp____iob_

Post by IceSoft »

Short info (done with PB 4.60 Beta2):
I updated msvcrt.lib on the Purebasic\PureLibraries\Windows\Libraries and it works now.

It looks for me: Developer which are no longer supporting Win98 should update all old libs and polink.exe after release of PB 4.60 but better: The nativ 4.60 should be switch to the actual libs/exe/etc.

@PureBasic welcome on 2011 ;-) 1998 is past ;-)
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: POLINK: error: Unresolved external symbol '__imp____iob_

Post by Keya »

Fred wrote:This is not a PureBasic error, you need to patch the lib to remove the iob_func stuff. PB links with an old CRT to be compatiable with former Windows version which doesn't support that. To fix it, add this preprocessor line to your compiler (only on x86):

Code: Select all

/D__iob_func=__p__iob
I confirm this works! :) In Visual Studio i added it as Additional Commandline:
Image

So that got rid of the __iob_func error. :)

I was also experiencing two __security errors of the same nature. These were resolved by turning off Buffer Security Checks:
Image

All good then! :)

Thanks Fred for .LIB support and the whole world of possibilities it opens up!
superadnim
Enthusiast
Enthusiast
Posts: 480
Joined: Thu Jul 27, 2006 4:06 am

Re: POLINK: error: Unresolved external symbol '__imp____iob_func

Post by superadnim »

i know this is an old thread but i am also trying to get rid of this error in x64 any advice?
pb 5.7lts because right now i cannot port my code to the latest version too many changes for my project

using the commandline options in x64 doesnt seem to work in visual studio.

:lol: should I bash the keyboard and give up?
:?
User avatar
mk-soft
Always Here
Always Here
Posts: 5408
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: POLINK: error: Unresolved external symbol '__imp____iob_func

Post by mk-soft »

They have changed the parameters for the command line pbcompiler. You have to adjust these in Visual Studio.

Constants '-o, --constant,/CONSTANT Name=Value' -> '-co, --constant,/CONSTANT Name=Value'
Output '-e, --executable, /EXE' -> '-o, --output, /OUTPUT "filename"'

See PB-Help
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply