Corman Lisp Discussion Groups Forum Index Corman Lisp Discussion Groups
For discussing Corman Lisp topics, and other programming topics
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Console output from a DLL

 
Post new topic   Reply to topic    Corman Lisp Discussion Groups Forum Index -> Technical Issues
View previous topic :: View next topic  
Author Message
Voblia



Joined: 21 Dec 2003
Posts: 3

PostPosted: Wed Feb 25, 2004 4:03 am    Post subject: Console output from a DLL Reply with quote

Code:
(ct:defun-dll-export-c-function (ufo-control "UfoControl")
    ((x :short-bool)(y :single-float))
    "void UfoControl(bool x, float y)"
    (when x (format nil "~A~%" y)))


throws me
Code:
Warning: the following function(s) are called from forms
;;; in file "D:\home\qzma\dll_test\test_dll2.lisp" but were not defined:
;;;     ASSEMBLER-X86::PUSH-SHORT-BOOL-LISP-ARG


if i try doing
Code:
(COMPILE-DLL "D:\\home\\qzma\\dll_test\\test_dll2.lisp" :output-file "D:\\home\\qzma\\dll_test\\test_dll2.dll")


And crashes the windows application that tries importing it.

The other problem is:
if i am changing the function into some simplier function like:
Code:
(ct:defun-dll-export-c-function (ufo-control "UfoControl")
    ((y :single-float))
    "void UfoControl(float y)"
    (format nil "~A~%" y)
    (force-output))

I am geting no output at all.
Back to top
View user's profile Send private message
mhs



Joined: 09 Mar 2004
Posts: 13
Location: Silicon Valley

PostPosted: Tue Mar 09, 2004 8:16 pm    Post subject: Console output from a DLL Reply with quote

Did you mean to write (format nil "~A~%" y)?
That will create and return a string. It won't write
anything to a stream.

That said, I don't know whether trying to write to the console
from a DLL will work. I tried it a while back and didn't succeed.
I ended up writing trace/debugging output to a file. I'd love to
find a solution.
- Mark Shirley
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Corman Lisp Discussion Groups Forum Index -> Technical Issues All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group