You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to compile to a windows DLL using MinGW in MSYS2 on windows, I receive the following warning when linking:
Standalone/synth.c: In function ‘process_one_file’:
Standalone/synth.c:284:28: warning: implicit declaration of function ‘Synthesis’ [-Wimplicit-function-declaration]
284 | stream_eof=Synthesis(mb);
| ^~~~~~~~~
which ultimately results in this error:
/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Standalone/synth.o:synth.c:(.text+0x148d): undefined reference to Synthesis' /usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0xfb): undefined reference to linear2ulaw'
/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0x165): undefined reference to linear2alaw' /usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0x229): undefined reference to linear2ulaw'
/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0x238): undefined reference to `linear2alaw'
collect2: error: ld returned 1 exit status
make: *** [Makefile:131: mbrola] Error 1
I have defined '#define DLL' and '#define __i386'. if I remove the DLL define I get a functioning executable. It appears that a preprocessor conditional relying on the '#define LIBRARY' directive is causing the function Synthesis within mbrola.c not to be defined. I have added pragma statements before and after the preprocessor '#else' around line 939 of mbrola.c to test this. When LIBRARY is defined, the function Synthesis is not defined, However, the DLL is dependent on LIBRARY given this preprocessor directive from common.h:
/* The Dll version is based on the library one -> export DLL functions */
#ifdef DLL
include "windows.h"
define LIBRARY
define DLL_EXPORT WINAPI
#else
define DLL_EXPORT
#endif
The text was updated successfully, but these errors were encountered:
When attempting to compile to a windows DLL using MinGW in MSYS2 on windows, I receive the following warning when linking:
Standalone/synth.c: In function ‘process_one_file’:
Standalone/synth.c:284:28: warning: implicit declaration of function ‘Synthesis’ [-Wimplicit-function-declaration]
284 | stream_eof=Synthesis(mb);
| ^~~~~~~~~
which ultimately results in this error:
/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Standalone/synth.o:synth.c:(.text+0x148d): undefined reference to
Synthesis' /usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0xfb): undefined reference to
linear2ulaw'/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0x165): undefined reference to
linear2alaw' /usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0x229): undefined reference to
linear2ulaw'/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: Bin/Standalone/Misc/audio.o:audio.c:(.text+0x238): undefined reference to `linear2alaw'
collect2: error: ld returned 1 exit status
make: *** [Makefile:131: mbrola] Error 1
I have defined '#define DLL' and '#define __i386'. if I remove the DLL define I get a functioning executable. It appears that a preprocessor conditional relying on the '#define LIBRARY' directive is causing the function Synthesis within mbrola.c not to be defined. I have added pragma statements before and after the preprocessor '#else' around line 939 of mbrola.c to test this. When LIBRARY is defined, the function Synthesis is not defined, However, the DLL is dependent on LIBRARY given this preprocessor directive from common.h:
/* The Dll version is based on the library one -> export DLL functions */
#ifdef DLL
include "windows.h"
define LIBRARY
define DLL_EXPORT WINAPI
#else
define DLL_EXPORT
#endif
The text was updated successfully, but these errors were encountered: