eyalroz / cuda-api-wrappers

Thin, unified, C++-flavored wrappers for the CUDA APIs
BSD 3-Clause "New" or "Revised" License
785 stars 80 forks source link

Compilation Fails if `BUILD_SHARED_LIBS` is Turned On [Windows] #76

Closed DeveloperPaul123 closed 5 years ago

DeveloperPaul123 commented 5 years ago

Currently, you will get unresolved symbol errors if you turn BUILD_SHARED_LIBS on in CMake and try to compile the library.

eyalroz commented 5 years ago

I haven't really thought about people forcing my library to build as shared rather than static. Well, I hope a bit of CMakeLists.txt fiddling can ameliorate this.

DeveloperPaul123 commented 5 years ago

febc33a did not fix the issue. You need to use an export macro to indicate that the library needs to be exported to a dynamic library (.dll on windows). Use can use generate_export_header() in CMake to auto generate this export header for you.

I can also do this as well if you prefer to just have a PR to review.

eyalroz commented 5 years ago

Oh, I'd definitely like a PR - especially for the case of a platform I can't test on right now...

eyalroz commented 5 years ago

@DeveloperPaul123 : Ping?

DeveloperPaul123 commented 5 years ago

I should be able to file a PR this week.

eyalroz commented 5 years ago

Great :-)

Remember I have a development branch - if you can PR against it, that would be great. But a PR against master is fine too.

DeveloperPaul123 commented 5 years ago

I'll definitely PR against the development branch; I think that's much cleaner and in general I leave the master branch for releases.

DeveloperPaul123 commented 5 years ago

This has been solved with #80

eyalroz commented 5 years ago

Well, only on the development branch; it (should) auto-close when I land development on master again...

DeveloperPaul123 commented 5 years ago

My bad, got a little over zealous