help-octave
[Top][All Lists]
Advanced

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

RE: "undefined reference" error message when using mkoctfile to create o


From: Yan Zhang
Subject: RE: "undefined reference" error message when using mkoctfile to create oct file
Date: Fri, 17 Feb 2017 09:53:46 -0800

Hi Mike,

Thank you for the response. I also found out later about what you just said. 
I'll try convert the dll file to lib file then see how it works.

Thanks,

Yan 

-----Original Message-----
From: Mike Miller [mailto:address@hidden 
Sent: Friday, February 17, 2017 9:46 AM
To: Yan Zhang
Cc: address@hidden
Subject: Re: "undefined reference" error message when using mkoctfile to create 
oct file

On Thu, Feb 16, 2017 at 10:45:03 -0800, Yan Zhang wrote:
> Hi Folks,
> 
> I'm a new user of Octave and trying to make a oct file so that I can 
> control a Newport Power Meter in my octave program. I have a c++ code 
> file "PowerMeter.cc", and I also have a header file "NewpDll.h" and a 
> dll file "usbdll.dll" which are obtained from Newport driver examples.
> When I tried to create the OCT file, I got the following messages:
> 
> ----------------------------------------------------------------
> >> mkoctfile PowerMeter.cc -usbdll.dll
> PowerMeter.o: In function `Z12CloseDevicesv':
> C:\Users\yan.zhang\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:19: 
> undefined reference to address@hidden'
> PowerMeter.o: In function `Z11OpenDevicesi':
> C:\Users\yan.zhang\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:29: 
> undefined reference to address@hidden'
> C:\Users\yan.zhang\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:30: 
> undefined reference to address@hidden'
> PowerMeter.o: In function `Z4ReadiPciPm':
> C:\Users\yan.zhang\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:40: 
> undefined reference to address@hidden'
> PowerMeter.o: In function `Z5WriteiPc':
> C:\Users\yan.zhang\Desktop\TestCam_Project\Oct_Src\cc/PowerMeter.cc:66: 
> 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
> ----------------------------------------------------------------
> 
> The functions "newp_usb_uninit_system", "newp_usb_init_product", etc 
> are already declared in the "NewpDll.h", and they should be 
> implemented in the usbdll.dll (I checked the dll file using "depends", 
> a program that can look into dll files). I don't understand why I 
> still got the above error messages.

I know very little about Windows programming, but isn't an import library 
required as well as a dll? From what I do understand, the dll is used at 
runtime, but an import library is required at build time to resolve the symbols 
above. I think this library would typically be called "usbdll.lib".

--
mike

reply via email to

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