Skip to content

Commit 98bdcdd

Browse files
author
Bright-yaw
committed
settjing .dll files to be read by other systems
1 parent 15c3325 commit 98bdcdd

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/ReadDBC.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ using DBFTables
88
using DataFrames
99
using Logging
1010
using Libdl
11+
using Base.Filesystem
1112

1213

1314
# Defining function dbctodbf
1415
function dbctodbf(input_file::String, output_file::String)
16+
# Set path for .dll files
17+
lib_path = "src/libdbc2dbf.dll"
18+
# Change permissions on the file before loading (optional and platform-dependent)
19+
chmod(lib_path, 0o755)
20+
1521
# Load the shared library
16-
lib = dlopen("src/libdbc2dbf.dll")
22+
lib = dlopen(lib_path)
1723

1824
# Ensure the library is properly loaded
1925
if lib === C_NULL

src/ccall_dbftodbc.jl

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
using Libdl
2+
using Base.Filesystem
23

34
function dbctodbf(input_file::String, output_file::String)
5+
6+
# Set path for .dll files
7+
lib_path = "src/libdbc2dbf.dll"
8+
# Change permissions on the file before loading (optional and platform-dependent)
9+
chmod(lib_path, 0o755)
10+
411
# Load the shared library
5-
lib = dlopen("libdbc2dbf.dll")
12+
lib = dlopen(lib_path)
613

714
# Ensure the library is properly loaded
815
if lib === C_NULL

0 commit comments

Comments
 (0)