advapi32 reference...

BlitzMax Forums/BlitzMax Programming/advapi32 reference...

Sarge(Posted 2005) [#1]
Well i am really stuck with this one. I have tried all type's of reference's ect, nothing seem's to work
Extern "Win32"
Function RegCloseKeyA( hKey:Int ) = "RegCloseKey@4"
End Extern

Local hCurKey:Int
RegCloseKeyA( hCurKey )

Error: undefined reference to `RegCloseKey@4'

When i opened "advapi32.a" in the lib folder it had "RegCloseKey@4" too so i dont understand this Error/Bug.


Perturbatio(Posted 2005) [#2]
try _RegCloseKey@4


Sarge(Posted 2005) [#3]
same thing, i have tried alot of different thing's


Sweenie(Posted 2005) [#4]
I guess libadvapi32.a is never linked when you compile your application.

The public module pub.Win32 never reference it.

try adding this at the top of your code...

Import "[Replace this with your  Blitzmax directory]\lib\libadvapi32.a"



Sarge(Posted 2005) [#5]
Strange im getting,

"C:/Program Files/BlitzMax/bin/ld.exe: cannot find"

when i put
Import "C:\Program Files\BlitzMax\lib\libadvapi32.a"


any idea's ?


Kev(Posted 2005) [#6]
Sarge try Import "-ladvapi32", this worked for me.


VIP3R(Posted 2005) [#7]
Spaces in the path maybe?

That caught me out earlier :)


Sarge(Posted 2005) [#8]
Kev,

I cant get that to work for some reason

C:/Program Files/BlitzMax/bin/ld.exe: cannot find -llibadvapi32


Kev(Posted 2005) [#9]
my mistake remove the lib part, Import "-ladvapi32" i think the '-l' links to the .dll found in windows/system

kev


Sarge(Posted 2005) [#10]
It work's, thank god

Thank's for all your replie's they have been a big help, i really appreciate it :)