Import and C++

Everything else that doesn't fall into one of the other PB categories.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

milan1612 wrote:OK, downloaded and replaced the new polink.exe, but the error persists :?
Same here :cry:
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Yes, the lib contains one external function exported as '_get', but the linker complains about a corrupted library. Has Polink caught up with VC 2008 yet?

Fred, do you use VC 2005 or VC 2008 for PB's userlibs?
I may look like a mule, but I'm not a complete ass.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

srod wrote:Yes, the lib contains one external function exported as '_get', but the linker complains about a corrupted library. Has Polink caught up with VC 2008 yet?

Fred, do you use VC 2005 or VC 2008 for PB's userlibs?
Well anyway I'm using the 2005 version and it does not work :(
Maybe a free VC++6 version exist, like for the 2005 one ?
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

Srod and I just discovered that the static library produced by the MingW compiler (free)
works like a charm (it outputs an .a file, just rename it to .lib).

Polink seems to have a problem with libraries compiled with VC++, not even
DLLs work in combination with Purebasic. Anyway, it could be that I just overlooked
a certain compiler option that causes these problems...

MingW can be found here: Sourceforge
Windows 7 & PureBasic 4.4
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Have you test with Polink 5.0 ? ( http://www.smorgasbordet.com/pellesc/ )

PB have Polink 4.0 in the compiler directory
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

@Thomas: Go to the first page of this thread :wink:
Windows 7 & PureBasic 4.4
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

milan1612 wrote:@Thomas: Go to the first page of this thread :wink:
I have overlooked this :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Well, using Mingw/Devc++ isn't a solution for me as my code doesn't compile with gcc... :cry:
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

In fact I managed to compile it thought PB's linker gives me 18 unresolved external symbols !

things like "ZNKSs4sizeEv" :shock: :?
Fred
Administrator
Administrator
Posts: 16680
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

We use VC++2005 (Express version) for all the libraries so it shouldn't be a problem. "ZNKSs4sizeEv" looks like a C++ mangled symbol, you probably have a C++ lib dependencie (MSVCP80 or such ?).
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Fred wrote:We use VC++2005 (Express version) for all the libraries so it shouldn't be a problem. "ZNKSs4sizeEv" looks like a C++ mangled symbol, you probably have a C++ lib dependencie (MSVCP80 or such ?).
Well I have those messages only with Dev Cpp, with VC++ 2005 or higher it just crash the linker (the same code is used) :cry:

Does the VC2005 project i send on the 1st page work for you ?
Fred
Administrator
Administrator
Posts: 16680
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

To have it to work, you have to set the whole program optimization (in General) to "No Whole Program Optimization", as polink doesn't support such.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Fred wrote:To have it to work, you have to set the whole program optimization (in General) to "No Whole Program Optimization", as polink doesn't support such.
Yes it seems that was the trick :) !
Thanks Fred !!


Though now with my real code, I've got 13 unresolved externals, most of these contains "std" :oops:
Is there another configuration to do ?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Polo wrote:Though now with my real code, I've got 13 unresolved externals, most of these contains "std" :oops:
Is there another configuration to do ?
If I had "msvcrt.lib" in my own lib, and use "dynamic link with ATL", only 2 errors remain !

"unresolved XRan@_StringBase@std@@SAXXZ"
"unresolved XLen..."
Fred
Administrator
Administrator
Posts: 16680
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

I don't know these symbols, sorry.
Post Reply