help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RE: "undefined reference" error message when using mkoctfile to crea


From: Yan Zhang
Subject: RE: RE: "undefined reference" error message when using mkoctfile to create oct file
Date: Thu, 23 Feb 2017 18:22:20 -0800

I did use gendef to generate the def file when creating the ".a" file. I also 
tried using pexports to create the def file and it worked as well. For my case, 
as mentioned previously, I think the key is to use ".a" file instead of ".lib" 
file when making the oct file, although I'm not sure why the ".lib" file didn't 
work.

Thanks,

Yan


-----Original Message-----
From: Tatsuro MATSUOKA [mailto:address@hidden 
Sent: Thursday, February 23, 2017 5:32 PM
To: Yan ; address@hidden
Subject: Re: RE: "undefined reference" error message when using mkoctfile to 
create oct file

----- Original Message -----

> From: Yan 
> To: "help-octave
> Cc: 
> Date: 2017/2/24, Fri 07:58
> Subject: RE: RE: "undefined reference" error message when using 
> mkoctfile to create oct file
> 
>T hanks to Tatsuro's help, the problem is resolved. Instead of making a  
>usbdll.lib file from the usbdll.dll, I made a usbdll.a file then 
>successful got  the oct file by using the following commands:
> 
> ----------------------------------------------------
> bash-3.1$ dlltool -k -d usbdll.def -l usbdll.a
> 
> bash-3.1$ mkoctfile
> -LC:\\Users\\yan\\Desktop\\TestCam_Project\\Oct_Src_6.2.1\\cc
> Powermeter.cc -lusbdll
> Warning: resolving address@hidden by linking to 
> _newp_usb_uninit_system Use --enable-stdcall-fixup to disable these 
> warnings Use --disable-stdcall-fixup to disable these fixups
> Warning: resolving address@hidden by linking to 
> _newp_usb_init_product
> Warning: resolving address@hidden by linking to 
> _newp_usb_get_device_info
> Warning: resolving address@hidden by linking to 
> _newp_usb_get_ascii
> Warning: resolving address@hidden by linking to 
> _newp_usb_send_ascii
> ----------------------------------------------------
> 
> The output of gendef is as follows:
> 
> -----------------------------------------------------------------
> bash-3.1$ ./gendef32 - usbdll.dll
> * [usbdll.dll] Found PE image
> ;
> ; Definition file of USBDLL.dll
> ; Automatic generated by gendef
> ; written by Kai Tietz 2008
> ;
> LIBRARY "USBDLL.dll"
> EXPORTS
> address@hidden
> address@hidden
> newp_usb_init_system
> address@hidden
> address@hidden
> newp_usb_uninit_system
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> address@hidden
> -----------------------------------------------------------------
> 
> Now my program is working! Thanks again for everyone's help.
> 
> Cheers,
> 
> Yan
> 
I am happy to hear your success.

I would like to confirm that def file used for "dlltool -k -d usbdll.def -l 
usbdll.a"
is generated by gendef.exe.

I would like to summarize to treat link errors using 3rd party dll with 
undefined reference to symbols with @n (n is number of bytes of arguments). 


Tatsuro  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]