This repository has been archived by the owner on Jul 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Error using MEX #11
Comments
Hi, could you solve it? |
i got the same error in MATLAB 2017b ,if you find the solution please let me know . |
Hey,
Regards |
thank you for your reply
…On Sun, Aug 4, 2019 at 10:44 PM AustrianCodeWriter ***@***.***> wrote:
Hey,
I had the same issue with MATLAB R2017B.
The file *libhackrf.lib* cannot be empty, since MATLAB use it for
compiling with MEX.
I found a way to easily create a *valid libhackrf.lib* file using
Microsoft Visual C++ ("MSVC"):
1. Call a new MSVC console (e.g. for "Visual Studio 2019":
Start a new command line window and call the batch-script from
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
\VC\Auxiliary\Build\vcvars64.bat")
2. Change directory to "deps\bin" and run:
dumpbin /EXPORTS libhackrf.dll > libhackrf.exports
3. Create a new file called "libhackrf.def" and insert the following
lines:
LIBRARY "libhackrf.dll"
EXPORTS
hackrf_board_id_name
hackrf_xxx
... for _hackrf_xxx_ insert each "**hackrf_**" element from your previously created
"libhackrf.exports" file
1.
In your MSVC console type the command:
lib /def:libhackrf.def /machine:x64 /out:libhackrf.lib
2.
If you now run *make* in MATLAB it should compile without any problems
Regards
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11?email_source=notifications&email_token=AKEQA6ZZUFRMNA6W6BDA7Y3QC4FALA5CNFSM4F7QYSZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3QF2OA#issuecomment-518020408>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKEQA63GQATBIQS7GCQGVWLQC4FALANCNFSM4F7QYSZQ>
.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I've tried to compile but afeter i added the empty libhackrf.lib file i get this error:
C:\hackrf_one\simulink-hackrf-1.0\simulink-hackrf-1.0\deps\bin\libhackrf.lib: file not recognized: File truncated
collect2.exe: error: ld returned 1 exit status
Error in make (line 66)
mex(options{:}, 'src/hackrf_find_devices.c')
btw i'm using MATLAB R2018a
any idea?
regards
The text was updated successfully, but these errors were encountered: