Build issue with SDL2_image and XCODE

  c++, sdl-2, xcode

At the moment I’m trying to learn game development with SDL. I’ve installed the SDL2 library and SDL2_image library with homebrew and coding with Xcode.

A problem I keep encountering is that everytime I build the project, I keep seeing the same SIGABRT message:

0x10006ded4 <+0>:  movl   $0x2000209, %eax          ; imm = 0x2000209 
0x10006ded9 <+5>:  movq   %rcx, %r10
0x10006dedc <+8>:  syscall 
->  0x10006dede <+10>: jae    0x10006dee8               ; <+20>
0x10006dee0 <+12>: movq   %rax, %rdi
0x10006dee3 <+15>: jmp    0x10006c408               ; cerror_nocancel
0x10006dee8 <+20>: retq   
0x10006dee9 <+21>: nop    
0x10006deea <+22>: nop    
0x10006deeb <+23>: nop    

If I only add SDL2’s library, the project builds and run normally, but the moment I add SDL2_image, the project just stops functioning. The libraries are linked to the .dylib in /usr/local/Cellar.

Can someone point out what is the cause of this issue?

Thank you.

Source: Windows Questions C++