advapi32 reference...

BlitzMax Forums/BlitzMax Programming/advapi32 reference...

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.

try _RegCloseKey@4

same thing, i have tried alot of different thing's

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"


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 ?

Sarge try Import "-ladvapi32", this worked for me.

Spaces in the path maybe?

That caught me out earlier :)

Kev,

I cant get that to work for some reason

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

my mistake remove the lib part, Import "-ladvapi32" i think the '-l' links to the .dll found in windows/system

kev

It work's, thank god

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