Library Function

BlitzMax Forums/BlitzMax Programming/Library Function

Vertex(Posted 2006) [#1]
Hi!
There is the function "InitCommonControlsEx" defined in the library libcomctl32.a (I've found the string with notepad).

SuperStrict

Framework PUB.Win32

Extern "Win32"
	Function InitCommonControlsEx:Int(lpInitCtrls:Byte Ptr)
End Extern

Global InitControls : TINITCOMMONCONTROLSEX

InitControls = New TINITCOMMONCONTROLSEX
InitControls.dwSize = SizeOf(TINITCOMMONCONTROLSEX)
InitControls.dwICC  = ICC_BAR_CLASSES ..
                      | ICC_PROGRESS_CLASS ..
                      | ICC_TREEVIEW_CLASSES

DebugLog InitCommonControlsEx(InitControls)


[...]undefined reference to `InitCommonControlsEx@4'


Width Extern "", Extern "comctl32", Extern "libcomctl32.a" it doesn't work too.

Any idea?

cu olli


fredborg(Posted 2006) [#2]
SuperStrict

Extern 
	Function InitCommonControlsEx:Int(lpInitCtrls:Byte Ptr)="InitCommonControlsEx@4"
End Extern

Global InitControls : TINITCOMMONCONTROLSEX

InitControls = New TINITCOMMONCONTROLSEX
InitControls.dwSize = SizeOf(TINITCOMMONCONTROLSEX)
InitControls.dwICC  = ICC_BAR_CLASSES ..
                      | ICC_PROGRESS_CLASS ..
                      | ICC_TREEVIEW_CLASSES

Print InitCommonControlsEx(InitControls)



Yan(Posted 2006) [#3]
The clue's in the error message...
Extern "Win32"
  Function InitCommonControlsEx(lpInitCtrls:Byte Ptr) = "InitCommonControlsEx@4"
End Extern



Azathoth(Posted 2006) [#4]
Add Import "-lcomctl32"


Vertex(Posted 2006) [#5]
Year, thanks!

Import: "Import declarations from a Module or source file.", but there is no speaking of librarys :(

cu olli