Skip to content

Add ability to build DLL/shared object#21

Merged
dunhor merged 5 commits into
mainfrom
dunhor/shared
Dec 3, 2025
Merged

Add ability to build DLL/shared object#21
dunhor merged 5 commits into
mainfrom
dunhor/shared

Conversation

@dunhor

@dunhor dunhor commented Dec 3, 2025

Copy link
Copy Markdown
Member

Fixes #20
cc @githuser8372

@dunhor dunhor requested a review from DHowett December 3, 2025 18:40
Comment thread scripts/init.sh
exit 1
fi
;;
o)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly -s was already taken and getopts doesn't allow multi character options such as -so :(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alas!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could go for case sensitive S if you're feeling Spicy

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not feeling that spicy

Comment thread src/include/inflatelib.h Outdated
Comment thread src/include/inflatelib.h
Comment on lines 152 to 154
/*
*
*/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self to fill these in

Comment thread scripts/init.sh
exit 1
fi
;;
o)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could go for case sensitive S if you're feeling Spicy

Comment thread src/include/inflatelib.h Outdated
#elif INFLATELIB_HAS_VISIBILITY_ATTR
#define INFLATELIB_EXPORT __attribute__((visibility("default")))
#else
#define INFLATELIB_EXPORT /* Not Windows and no visibility attribute... dont' decorate function declarations */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: dontn't

Suggested change
#define INFLATELIB_EXPORT /* Not Windows and no visibility attribute... dont' decorate function declarations */
#define INFLATELIB_EXPORT /* Not Windows and no visibility attribute... don't decorate function declarations */

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAHA I'm faster than you

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i exist only in ignominy

Comment thread src/include/inflatelib.h

/*
* INFLATELIB_BUILD_SHARED The library is being built as a shared library
* INFLATELIB_CONSUME_SHARED The library is being consumed as a shared library

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting debate about whether shared should be the default mode of consumption or not

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Nice thing about being "v0" is that we can delay that decision for now. We can also choose a separate default for the vcpkg port. One thing worth mentioning is that zlib ships as a shared object by default, at least on vcpkg

@dunhor dunhor merged commit b2b9bb4 into main Dec 3, 2025
104 checks passed
@dunhor dunhor deleted the dunhor/shared branch December 3, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building dynamic library (.so)?

2 participants