:-1: Undefined symbol: SoLoud::sdl2_init(SoLoud::Soloud*, unsigned int, unsigned int, unsigned int, unsigned int)
I am still fairly new to c++ development so any help would be really appreciated!
--
You received this message because you are subscribed to the Google Groups "SoLoud audio engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to soloud+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/soloud/e94e9885-806a-45f8-94a4-4c396b0ad8c6%40googlegroups.com.
Undefined symbols for architecture x86_64:
"SoLoud::sdl2_init(SoLoud::Soloud*, unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
SoLoud::Soloud::init(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) in soloud.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The sdl2_init function is defined in soloud_sdl2.cpp in the backend/sdl folder. Make sure it's included.
On Thu, Mar 19, 2020 at 5:43 PM Daniel Davies <danield...@gmail.com> wrote:
Hi there thanks for accepting my join request, I really like the features of this library and I am trying to configure it to work with XCode 10.1 to implement audio in a game that I have been working on with sdl2.--I have tried to set up the lazy way by adding the source files directly to my project (specifically I added all the files from: core, backend/sdl, and audiosource/wav as well as all the header files from the include directory)I am getting the following undefined symbol error when compiling after adding #define WITH_SDL2.:-1: Undefined symbol: SoLoud::sdl2_init(SoLoud::Soloud*, unsigned int, unsigned int, unsigned int, unsigned int)
I am still fairly new to c++ development so any help would be really appreciated!
You received this message because you are subscribed to the Google Groups "SoLoud audio engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sol...@googlegroups.com.
where should I be adding #define WITH_SDL2I suspect the problem might lie there, at the moment I am calling it in soloud.cpp
--
You received this message because you are subscribed to the Google Groups "SoLoud audio engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to soloud+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/soloud/1d8454ee-28df-430b-9c02-d4f883bc4724%40googlegroups.com.
If you take a look at soloud_sdl2.cpp, you'll find that it defines sdl2_init both with and without WITH_SDL2, so you still have a problem that xcode is not including that file for some reason.WITH_SDL2 should be set globally, i.e, for every source file, even though only a couple actually use it.
On Thu, Mar 19, 2020 at 8:24 PM Daniel Davies <danield...@gmail.com> wrote:
where should I be adding #define WITH_SDL2--I suspect the problem might lie there, at the moment I am calling it in soloud.cpp
You received this message because you are subscribed to the Google Groups "SoLoud audio engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sol...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "SoLoud audio engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to soloud+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/soloud/c3c8cae4-6b37-4907-b6d8-da3814c96b07%40googlegroups.com.
#ifdef __cplusplus
extern "C" {
#endif
... original content of headerfile goes here.
#ifdef __cplusplus
}