Can't get SDL2 compiled in static way with dependences included

Hi all !
I’ve done an app in a raspberry pi to show some images moving on screen, all is shoot by a serial port command, I used wiringpi for that.

Now, for a fastest boot of my raspberry, i did it this way: Raspberry Pi 3 Fastboot - Less Than 2 Seconds - Bir Coder'ın Günlüğü

The point is i need a full static compilation of my entire code to run in that customized OS, testing a demo without using wiringpi on it, I’ve tried compiling the app succesufully doing this:

gcc -Wall app_test.cpp /usr/lib/arm-linux-gnueabihf/libSDL2.a -Wl,–no-undefined -lm -ldl -lasound -lm -ldl -lpthread -lpulse-simple -lpulse -lsndio -Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host -lX11 -lXext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lwayland-egl -lwayland-client -lwayland-cursor -lxkbcommon -lpthread -lrt

In a lite raspian OS works fine, but not in the minimal OS generated by the Buildroot named before wont.
As i analize, some SDL2 dependencies are not included in the compilation, like “”, “”, etc.

the log is:
error while loading shared libraries: cannot open shared object file: No such file or directory

Since i’m a very begginer with all this, please, i need some expert help.

Solved the issue. I should compile the dependencies in dynamic way.