Link .lib only without the dll?

Just starting out? Need help? Post your questions and find answers here.
User avatar
idle
Always Here
Always Here
Posts: 6101
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Link .lib only without the dll?

Post by idle »

Olli wrote: Mon Sep 25, 2023 10:36 pm
idle wrote: Mon Sep 25, 2023 10:26 pm here's the link to the Chi's tool
viewtopic.php?t=81177
@idle, when I read you so often, in a so short period, that indicates to me, it is the hour for me to sleep.
Sometimes I don't sleep! :mrgreen:
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Link .lib only without the dll?

Post by pamen »

Hmm, the problem seems to be , that pbcompilerc does not like the code with "?" strings , while asm compiles with no issues:
when compiling with C backend (mandatory for Chi tool and swapping msvcrt) - a line generated by PB like this to cover the prototype from external lib:

Code: Select all

integer f_xtpskinmanager() asm("?XTPSkinManager@@YAPEAVCXTPSkinManager@@XZ");
will produce that:

Code: Select all

C:\TMP\cckKM7lk.s: Assembler messages:
C:\TMP\cckKM7lk.s:621: Error: invalid character '?' before operand 1
It does not matter if the lib is just a declaration or not - AMS compiler is ok, pbcompilerc is not. It does not matter if the msvcrt.lib is PB original or not.
running Beta 9

Edit:
What is the exact build in msvcrt version delivered with PureBasic? It may be much simpler - I can compile and run the static lib for any msvcrt from WindowsXP/Vista to 2022 - code has switches for that.
S.T.V.B.E.E.V.
Olli
Addict
Addict
Posts: 1272
Joined: Wed May 27, 2020 12:26 pm

Re: Link .lib only without the dll?

Post by Olli »

Code: Select all

integer f_xtpskinmanager() asm("?XTPSkinManager@@YAPEAVCXTPSkinManager@@XZ");
1) is the prefix 'f_' exact ?
2) why no templates between parenthesis '()' and more perhaps...
example :

Code: Select all

class CXTPSkinManager * __ptr64 __cdecl XTPSkinManager(void);
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Link .lib only without the dll?

Post by pamen »

Olli
Good question, maybe
I was quoting C code generated by PureBasic C Compiler with -c .
So blame PureBasic c comp[iler for how the calls to an external lib are made.
In any case this does not produce any exe output, even with dynamic linking.
S.T.V.B.E.E.V.
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Link .lib only without the dll?

Post by pamen »

And repeat:
What is the exact build in msvcrt version delivered with PureBasic?
S.T.V.B.E.E.V.
Olli
Addict
Addict
Posts: 1272
Joined: Wed May 27, 2020 12:26 pm

Re: Link .lib only without the dll?

Post by Olli »

I do not like the static libs, so I blame none. Let us wait Idle awaking...
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Link .lib only without the dll?

Post by pamen »

Waiting silently for Idle.
S.T.V.B.E.E.V.
User avatar
idle
Always Here
Always Here
Posts: 6101
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Link .lib only without the dll?

Post by idle »

It's 2.15 am this was the closest light..
Olli
Addict
Addict
Posts: 1272
Joined: Wed May 27, 2020 12:26 pm

Re: Link .lib only without the dll?

Post by Olli »

It was Idle... A doubt about an external static library, and the result: a concussion in the middle of his sleep.

I pray you all, never do that with me. Never kill me with a question about a Microsoft file in the middle of one of my nights. Please.
pamen wrote:What is the exact build in msvcrt version delivered with PureBasic?
Msvcrt.DLL is already in your Microsoft system before you install PureBasic.
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Link .lib only without the dll?

Post by pamen »

I wish Idle sleeps well.

Olli, if you are awake in far away France - I'm asking about PureBasic msvcrt.lib - what msvcrt is this lib based on (Chi ib versions crash the pb compiler for me), not all the MSVCRT.DLL on my system - I do have all, from XP to VS 2022.
S.T.V.B.E.E.V.
Olli
Addict
Addict
Posts: 1272
Joined: Wed May 27, 2020 12:26 pm

Re: Link .lib only without the dll?

Post by Olli »

You puzzle me... Never need this...
Olli
Addict
Addict
Posts: 1272
Joined: Wed May 27, 2020 12:26 pm

Re: Link .lib only without the dll?

Post by Olli »

PureBasic 5.50 x64 for Windows (Microsoft)
290 774 bytes
November 24th, 2015 14:57


PureBasic 6.00 x64 for Windows (Microsoft)
290 774 bytes
Juny 28, 2022 17:47:18


Do you want a hash ?
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Link .lib only without the dll?

Post by pamen »

no, msvcrt.lib is from ‎24 ‎November ‎2015, ‏‎13:57:48 - I need a version of VS, not the date, but thanks, I will just use dumbin to find out which VS it is from.
S.T.V.B.E.E.V.
User avatar
idle
Always Here
Always Here
Posts: 6101
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Link .lib only without the dll?

Post by idle »

Looks like the same issue
viewtopic.php?t=82528
pamen
Enthusiast
Enthusiast
Posts: 193
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Link .lib only without the dll?

Post by pamen »

Yes, exactly the same, no resolution yet.
S.T.V.B.E.E.V.
Post Reply