Skip to content

Commit 56c2c3c

Browse files
committed
Remove .def file generation, use attribute of declspec instead.
1 parent 2a6f090 commit 56c2c3c

3 files changed

Lines changed: 6 additions & 16 deletions

File tree

lib/ruby-bindgen/visitors/rice/project.def.erb

Lines changed: 0 additions & 4 deletions
This file was deleted.

lib/ruby-bindgen/visitors/rice/project.hpp.erb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@
33
#include <rice/rice.hpp>
44

55
extern "C"
6-
void <%= init_name %>();
6+
#if defined(_WIN32)
7+
__declspec(dllexport)
8+
#else
9+
__attribute__((visibility("default")))
10+
#endif
11+
void <%= init_name %>();

lib/ruby-bindgen/visitors/rice/rice.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def visit_start
130130
def visit_end
131131
create_rice_include_header
132132
create_project_files
133-
create_def_file
134133
end
135134

136135
# Returns the path to the Rice include header (user-specified or auto-generated)
@@ -1854,16 +1853,6 @@ def create_project_files
18541853
self.outputter.write(rice_cpp, content)
18551854
end
18561855

1857-
def create_def_file
1858-
return unless @project
1859-
1860-
# Create def file to export Init function
1861-
def_name = "#{project}.def"
1862-
init_function = "Init_#{project}"
1863-
1864-
content = render_template("project.def", :init_function => init_function)
1865-
self.outputter.write(def_name, content)
1866-
end
18671856

18681857
def figure_method(cursor)
18691858
name = cursor.kind.to_s.delete_prefix("cursor_")

0 commit comments

Comments
 (0)