-
Hello community.- I compile/link my game with the command gcc -o exename main.c -lraylib -lstdc++ on Linux, but i have sent my "exe" to another Linux user and he says he cant run it. Could someone tell me what im doing wrong in order for my "exe" to run in other Linux dristributions ? Thanks in advance !!! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
i generally just statically compile raylib, its not a gigantic library...
…On Sat, 5 Nov 2022 at 20:10, Jorge H Carretero ***@***.***> wrote:
Hello community.-
I compile/link my game with the command gcc -o exename main.c -lraylib
-lstdc++ on Linux, but i have sent my "exe" to another Linux user and he
says he cant run it. Could someone tell me what im doing wrong in order for
my "exe" to run in other Linux dristributions ? Thanks in advance !!!
—
Reply to this email directly, view it on GitHub
<#2789>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFO4SOL5CNRC5QZEAEFHE3WG25MRANCNFSM6AAAAAARYCL6TE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
blog bedroomcoders.co.uk <http://bedroomcoders.co.uk>
Free source code and tutorials!
Disclaimer:
By sending an email to ANY of my addresses you are agreeing that:
1. I am by definition, "the intended recipient"
2. All information in the email is mine to do with as I see fit and make
such financial profit, political mileage, or good joke as it lends itself
to. In particular, I may quote it where I please.
3. I may take the contents as representing the views of your company.
4. This overrides any disclaimer or statement of confidentiality that
may be included on your message.
|
Beta Was this translation helpful? Give feedback.
-
@2gud4u The raylib by default is compiled static, i.e. you get Also, not sure why you are compiling main.c with GCC and then linking to stdc++. Is it a C or C++ project? The best way is to compile a fully static binary, Glibc will complain about that but the Musl toolchain actually recommends that you build the static binary. Such binary in theory should work on every distribution. Anyway, doesn't look like a raylib issue, this is a general Linux question. |
Beta Was this translation helpful? Give feedback.
-
Well, that is not static, you linked against the shared raylib .so library, so any Linux OS would need to have raylib installed as a shared library in order to use your app/game. |
Beta Was this translation helpful? Give feedback.
Well, that is not static, you linked against the shared raylib .so library, so any Linux OS would need to have raylib installed as a shared library in order to use your app/game.
.so
is a dynamic/shared library,.a
orarchive
is a static library.