This almost always means that the DLL was compiled for a different architecture than kdb+. If you have the 32-bit version of kdb+, then you need to compile a 32-bit DLL. Try changing the amd64 in comprun.bat to amd64_x86.
Thanks Ryan, that makes sense.<o:p></o:p>
<o:p> </o:p>
I was testing with 32bit Kdb and getting that error so I tried on my 64bit Kdb and it worked. <o:p></o:p>
<o:p> </o:p>
From: Ryan Gonzalez [mailto:rymg19@gmail.com]
Sent: December 2, 2015 2:08 PM
To: personal-kdbplus@googlegroups.com; Roni Hoffman <hoffmanroni@gmail.com>
Subject: Re: [personal kdb+] Compiling a C DLL on Windows<o:p></o:p>
<o:p> </o:p>
This almost always means that the DLL was compiled for a different architecture than kdb+. If you have the 32-bit version of kdb+, then you need to compile a 32-bit DLL. Try changing the amd64 in comprun.bat to amd64_x86.<o:p></o:p>
On December 2, 2015 12:58:06 PM CST, Roni Hoffman <hoffmanroni@gmail.com> wrote:<o:p></o:p>
Hello <o:p></o:p>
<o:p> </o:p>
I am trying to work through thisexample on timestored about loading a C dll but having an issue.<o:p></o:p>
<o:p> </o:p>
I have gotten as far as getting the dll compiled. When I place the dll beside q.exe and try and load load-functions.q I get this error<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
'%1 is not a valid Win32 application.<o:p></o:p>
@<o:p></o:p>
“q”<o:p></o:p>
“mysum:
mymoving 2:(
mysum;2)”<o:p></o:p><o:p> </o:p>
I’m trying to load TA-lib on windows but having an issue so thought I’d start here.<o:p></o:p>
–
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.<o:p></o:p>