Lisp Knowledgebase
Title: Failed to register external symbol from a DLL
ID: 10012
Product: LispWorks for Windows Version: All OS: all Windows platforms | |
Description: The function needs to be exported from the DLL. This can be done in one of three ways: 1) Use the __declspec(ddlexport) declaration in the C file. 2) Use a /export directive in the link command. 3) Use a .def file. (For more detail, see under "Export from a DLL" in the VC++ online manuals.) If you use the first method (#1), you will probably want to make the functions use the stdcall calling convention since that removes another level of name mangling. | |
See Also: Lisp Support Call #5390 Workaround: Patch: | |
Hardware:N/A | |
Summary:>I created a *very* simple .dll with one file with the following (using VC++ 4.2): >int _stdcall fli(void) >{ > return(5); >} >I then compiled the following form >(fli:define-foreign-function (fli "fli") () > :result-type :int > :calling-convention :stdcall > :documentation "Just a test to seeif it works" > :module "d:/users/pedro/c/fli/release/fli.dll") > >I then called it as such: (fli) and I got the following error: >Condition: Failed to register external symbol #<FLI::EXTERNAL-SYMBOL "fli" : >addr = #x00000000>. | |
Bug#: | |
Patch Enhancement#: | |
Reported: |