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 14:58:19 -0800

Thanks 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


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

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

> From: Tatsuro MATSUOKA
> To: Yan  ; "help-octave> Cc: 
> Date: 2017/2/22, Wed 13:54
> 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/22, Wed 11:15
>>  Subject: RE: RE: "undefined reference" error message when using
> mkoctfile to create oct file
>> 
>> T hanks a lot for the kind help. I tried the dlltool and pexports and  
>> successfully got a new lib file which I renamed as
> "usbdllnew.lib". 
>>  Unfortunately, I still couldn't make it work. Following are the
> messages I
>>  got:
>> 
>> 
>>  -----------------------------------------------------
>>>>   mkoctfile PowerMeter.cc -L. -lusbdllnew
>>  PowerMeter.o: In function `Z12CloseDevicesv':
>> 
> C:\Users\yan\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:20: 
> 
>>  undefined reference to address@hidden'
>>  PowerMeter.o: In function `Z11OpenDevicesi':
>> 
> C:\Users\yan\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:30: 
> 
>>  undefined reference to address@hidden'
>> 
> C:\Users\yan\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:31: 
> 
>>  undefined reference to address@hidden'
>>  PowerMeter.o: In function `Z4ReadiPciPm':
>> 
> C:\Users\yan\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:41: 
> 
>>  undefined reference to address@hidden'
>>  PowerMeter.o: In function `Z5WriteiPc':
>> 
> C:\Users\yan\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:67: 
> 
>>  undefined reference to address@hidden'
>>  collect2.exe: error: ld returned 1 exit status
>>  warning: mkoctfile exited with failure status
>>  warning: called from
>>      mkoctfile at line 171 column 5
>>  -----------------------------------------------------
>> 
>> 
>>  Thanks,
>> 
>>  Yan
>>  


Hello

The below might be related to your trouble.

http://stackoverflow.com/questions/8063842/mingw32-g-and-stdcall-suffix


Tatsuro



reply via email to

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