Link .lib together with dll
-
mrniceguy1971
- User

- Posts: 56
- Joined: Tue May 16, 2006 3:52 pm
Link .lib together with dll
Would it be possible to link a .lib or .obj file in a Purebasic DLL which call functions from the .lib or .obj?
Re: Link .lib together with dll
see Import
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.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
mrniceguy1971
- User

- Posts: 56
- Joined: Tue May 16, 2006 3:52 pm
Re: Link .lib together with dll
Thanks. Will take a look at this.
-
mrniceguy1971
- User

- Posts: 56
- Joined: Tue May 16, 2006 3:52 pm
Re: Link .lib together with dll
Already imported a lib but now I get the following error.
POLink: error: Unresolved external symbol '_imp_ConvertSidToStringSidW'.
POLink: fatal error: 1 unresolved external(s).
Any hints/tip how to solve this are appreciated
POLink: error: Unresolved external symbol '_imp_ConvertSidToStringSidW'.
POLink: fatal error: 1 unresolved external(s).
Any hints/tip how to solve this are appreciated
Re: Link .lib together with dll
You have to import advapi32.lib, but not the one from PureBasic, is to old.
Code: Select all
Import "Advapi32.lib"
EndImportPureBasic 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.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
mrniceguy1971
- User

- Posts: 56
- Joined: Tue May 16, 2006 3:52 pm
Re: Link .lib together with dll
Thanks again. This solved the problem.
