Jump to content

OpenCV 64 Bit


JoGa
 Share

Recommended Posts

Greetings,

here is a Autoit3 v3.3.14.5, 64 Bit installation on windows 10 with current updates.

In a simple script I'm Dllcall'ing a 64 bit dll.

# T1.au3
Local $name = "T1DLL.dll"
if (FileExists($name)) Then
    ConsoleWrite("DLL '" &$name &"' exists" &@CRLF)
EndIf
Local $DLL = DllOpen($name)
if (@ERROR OR $DLL = -1) then
    ConsoleWrite("DllOpen ERROR=" &@ERROR &" DLL=" &$DLL &@CRLF)
Else
    ConsoleWrite("DllOpen Success" &@CRLF)
endif
DllCall($DLL, "none:cdecl", "SomeFunction", "str", "DLL Call from T1.au3")
if (@ERROR) then
    ConsoleWrite("DllCall ERROR=" &@ERROR &" DLL=" &$DLL &@CRLF)
Else
    ConsoleWrite("DllCall Success" &@CRLF)
endif

The C code contains one 64 bit OpenCV call:    cv::destroyAllWindows();.


Excuting T1.au3 with SciTE gives:

Quote

>"D:\Programme\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\T1.au3" /UserParams    
+>21:01:08 Starting AutoIt3Wrapper v.2.1.0.33    Environment(Language:0407  Keyboard:00000407  OS:WIN_8/  CPU:X64 OS:X64)
>Running AU3Check (3.3.14.5)  from:D:\Programme\AutoIt3
+>21:01:08 AU3Check ended.rc:0
>Running:(3.3.14.5):D:\Programme\AutoIt3\autoit3_x64.exe "D:\T1.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
DLL 'T1DLL.dll' exists
DllOpen ERROR=0 DLL=-1
DllCall ERROR=1 DLL=-1
+>21:01:08 AutoIT3.exe ended.rc:0
>Exit code: 0    Time: 2.027


If the c code is compiled *without* the OpenCV call T1.au3 runs successful:

Quote

>"D:\Programme\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\T1.au3" /UserParams    
+>21:18:20 Starting AutoIt3Wrapper v.2.1.0.33    Environment(Language:0407  Keyboard:00000407  OS:WIN_8/  CPU:X64 OS:X64)
>Running AU3Check (3.3.14.5)  from:D:\Programme\AutoIt3
+>21:18:20 AU3Check ended.rc:0
>Running:(3.3.14.5):D:\Programme\AutoIt3\autoit3_x64.exe "D:\T1.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
DLL 'T1DLL.dll' exists
DllOpen Success
DllCall Success
+>21:18:23 AutoIT3.exe ended.rc:0
>Exit code: 0    Time: 5.051

 

I checked T1DLL.dll, it's definitely a 64 bit dll.

What could cause the problem?

Any hint would be very much appreciated.

Thanks

Wolf

 

 

 

 

Edited by JoGa
Unintended hit return...
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...