Comments (5)
Hi @carlfm01 ,
as far as I know, there is no Bazel BUILD file available for dlfcn-win32
.
However, the library is quite simple (it is just composed of the dlfcn.h
header file and
the dlfcn.c
source file. There are a few more details (you need to define the SHARED
macro
if you are building it as a shared library, and you need to link the psapi
library) but it should be fairly simple to compile in any build system, and bazel
has some nice docs on how to build C++ projects: https://docs.bazel.build/versions/master/tutorial/cpp.html and https://github.com/bazelbuild/examples/tree/master/cpp-tutorial .
As the library is relatively simple, it is not a problem to maintain several build systems upstream, so if you want to work on Bazel support I will be happy to review a PR.
from dlfcn-win32.
Thanks, really appreciate that you take the time to reply, I'll look into that. My final goal with this is to finally bring a DeepSpeech client to Windows. I'll share the results.
from dlfcn-win32.
For people interested in Bazel support, the rules_foreign_cc
may be interesting.
from dlfcn-win32.
Hi, I finally compiled it using this BUILD file for Bazel
cc_library(
name = "dlfnwin",
srcs = ["dlfcn.c"],
hdrs = ["dlfcn.h"],
linkopts = ["-DEFAULTLIB:psapi.lib"],)
cc_library(
name = "testdl",
srcs = ["testdll.c"],
deps = [
":dlfnwin",
],)
cc_binary(
name = "test",
srcs = ["test.c"],
deps = [
":testdl",
],)
The problem is when I run the .exe the file the lib didn't load.
I found https://github.com/kkm000/openfst for my project. When I finish my project I'll try again.
from dlfcn-win32.
I am not a bazel user, but I have two doubts:
- Are you sure that
cc_library
fortestdll.c
is generating a shared library with the correct nametestdll.dll
? The test hardcoded that that is the expected name of the plugin to load:Line 90 in f1acf5d
- Are you running the test executable in the same directory that contains the
testdll.dll
file? Again, that is something that is hardcoded in the test.
from dlfcn-win32.
Related Issues (20)
- Understand why settting cmake_minimum_required to 3.20 make test fail HOT 1
- Use of LoadLibraryExA with LOAD_WITH_ALTERED_SEARCH_PATH flag HOT 9
- config.mak: No such file or directory HOT 5
- can I dlsym malloc function? HOT 5
- Add support and docs for using dlfcn-win32 using CMake's FetchContent module HOT 1
- Installation instructions HOT 7
- MAX_PATH restriction feasible after Windows dropped it for Win10? HOT 3
- ERROR Non-library file %TEMP%\temp.dll was processed via WINAPI: 18 From line 138 HOT 3
- Should common subset of ZDICT_cover_params_t and ZDICT_fastCover_params_t be moved into a separate struct and put it into the front of the struct, implementing inheritance this way? HOT 1
- UTF-8 path failes to dlopen HOT 11
- Add automatic tests with Dr. Memory
- dlsym multiple defintion HOT 2
- undefined reference to `GetModuleHandleExA' HOT 6
- AppVeyor test problems HOT 4
- Using dlfcn-win32 as a subproject of libbacktrace, gollvm HOT 3
- Write docs on how to use the dlfcn-win32 in a buildsystem agnostic way
- no RTLD_NOLOAD HOT 6
- Add support to dladdr() to inspect export table for additional symbols
- Release 1.3.0 HOT 7
- Testing i586-mingw32msvc-gcc builds via cmake HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlfcn-win32.