Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved external symbols when building with UWP #32

Closed
GregSlazinski opened this issue Apr 19, 2017 · 7 comments
Closed

Unresolved external symbols when building with UWP #32

GregSlazinski opened this issue Apr 19, 2017 · 7 comments

Comments

@GregSlazinski
Copy link

I'm getting unresolved external symbols when compiling in following cases:

CreateFileA CreateFileW from here: https://github.com/xiph/flac/blob/master/src/libFLAC/windows_unicode_filenames.c
when compiling on Windows Universal Platform (UWP does not have CreateFileA CreateFileW, it only has CreateFile2)

flac_max flac_min from here:
https://github.com/xiph/flac/blob/master/src/libFLAC/include/private/macros.h
when compiling on Android with latest Android NDK (Clang)

there are so many options in that file, but can you just keep it simple to one version in all cases:

#define flac_min(a,b) ((a) <= (b) ? (a) : (b))
#define flac_max(a,b) ((a) >= (b) ? (a) : (b))
@erikd
Copy link
Member

erikd commented Apr 19, 2017

Was a bit confused about the relationship between Windows and Android. Then I figured out this was actually two questions.

The first question about unresolved external symbols is not one I can answer. The existing code does compile and run on standard windows. If Windows Universal Platform is different in some way from standard Windows then someone needs to provide support for that.

With regard to the implementations of flac_min etc you say:

there are so many options in that file, but can you just keep it simple to one version in all cases:

I disagree. The first version uses GCC's __typeof__ operator to provide a level of type safety that is not possible with what you suggest.

@GregSlazinski
Copy link
Author

CreateFileA and CreateFileW need to be replaced with CreateFile2 on UWP

on Android the flac_min and flac_max are simply not defined at all, so the compilation/linking process fails.

@erikd
Copy link
Member

erikd commented Apr 19, 2017

The flac_min/flac_max issue is fixed in https://git.xiph.org/?p=flac.git;a=commit;h=64f47c2d71ffba5aa8cd1d2a447339fd95f362f9

@erikd
Copy link
Member

erikd commented Apr 19, 2017

I've mentioned the UWP problem on the flac-dev mailing list and linked to this issue.

@erikd erikd changed the title Unresolved external symbols Unresolved external symbols when building with UWP Jul 22, 2017
@ktmf01
Copy link
Collaborator

ktmf01 commented Jun 24, 2022

@GregSlazinski Quite a bit has changed with the UTF-8 code, is this still an issue?

@ktmf01
Copy link
Collaborator

ktmf01 commented Jul 13, 2022

Several patches for UWP are supplied here: https://gitlab.xiph.org/xiph/flac/-/merge_requests/1

It seems however users of UWP are encouraged to migrate: https://www.techradar.com/news/microsoft-is-finally-dropping-uwp-app-support-windows-app-sdk-heres-why

Because of that, I'm not sure whether rebasing and integrating these patches is worth the hassle.

@ktmf01
Copy link
Collaborator

ktmf01 commented Sep 22, 2022

This has been fixed with the merge of #457

@ktmf01 ktmf01 closed this as completed Sep 22, 2022
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

No branches or pull requests

3 participants