Comments (3)
#152 has landed. If you still have issues building DLLs, please comment on here and I'll reopen.
Cheers!
from marl.
Hi @aschrein,
Thank you for alerting me to this. I tried to reproduce using Microsoft Visual Studio Community 2019 Version 16.4.5
, and I cannot.
In CMakeCache.txt
, I have MARL_BUILD_SHARED:BOOL=False
. BUILD_SHARED_LIBS
is undefined.
I cleaned the output directories, and rebuilt:
c:\src\marl\out\build\x64-Release>dir marl.*
Volume in drive C is Windows
Volume Serial Number is BA92-FD6B
Directory of c:\src\marl\out\build\x64-Release
15/06/2020 10:18 AM 3,877,600 marl.lib
Setting MARL_BUILD_SHARED:BOOL=True
, will attempt to build marl as a dll, but you may notice that with a clean build, the tests, benchmarks and samples fail to link. This is because we're not currently exporting any public dll symbols, and the marl.lib
import library is not being produced (presumably because it is empty) which is needed to link the applications.
Looking a CMake's documentation:
add_library
STATIC
,SHARED
, orMODULE
may be given to specify the type of library to be created.STATIC
libraries are archives of object files for use when linking other targets.SHARED
libraries are linked dynamically and loaded at runtime.MODULE
libraries are plugins that are not linked into other targets but may be loaded dynamically at runtime usingdlopen
-like functionality. If no type is given explicitly the type isSTATIC
orSHARED
based on whether the current value of the variableBUILD_SHARED_LIBS
is ON.
BUILD_SHARED_LIBS
Global flag to cause
add_library()
to create shared libraries if on.If present and true, this will cause all libraries to be built shared unless the library was explicitly added as a static library. This variable is often added to projects as an
option()
so that each user of a project can decide if they want to build the project using shared or static libraries
(bold emphasis mine)
So the docs also suggest that we shouldn't be getting dlls built by default, unless you're using BUILD_SHARED_LIBS
.
This did highlight to me that attempting to use MARL_BUILD_SHARED
/ BUILD_SHARED_LIBS
on Windows will fail miserably, so I've created #152 to actually export the dll symbols, allowing use of marl as a dll.
If at all possible, can you confirm that you are indeed statically building without #152? If you're somehow building and linking marl as a dll, I'd like to figure out why and how :)
from marl.
Thanks for your answer.
I can't verify right now but I guess you're correct that something was wrong rather on my side. I'll let you know once I have a chance whether it was BUILD_SHARED_LIBS or not.
from marl.
Related Issues (20)
- [question] why is this line there HOT 4
- when I run marl-unittests on arm soc, Segment error occurred HOT 7
- The error "ASSERT: alignment (0xb35245b4) must be less than the page size (0x1000)" certainly appear HOT 2
- Tests aren't run, only built
- CHANGES.md says that the version is 1.0.0-dev but there is no such tag HOT 1
- [question] enabling support for new architecture -- riscv64 HOT 5
- Can't capture unique_ptr in marl::schedule lambda HOT 1
- [Question] Fiber yield behavior HOT 4
- [Question] implemention of function alignedFree() HOT 1
- [Question] Mutex for fiber HOT 3
- Difference between option_if_not_defined and option HOT 1
- [Question] Scheduler suspend/resume and stop HOT 2
- Multiple tasks queued to the same worker while other workers are idle HOT 8
- what's the difference between task and fiber? HOT 12
- Webassembly compatibility HOT 6
- [Question] effect ParallelFor HOT 3
- JNI from Fibers HOT 3
- Pool API missing important feature for object construction!!! HOT 2
- [Question] Waiting for multiple events to be signaled to protect a critical section HOT 2
- crashed when Scheduler::Worker::tryLock HOT 2
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 marl.