Again a newbie issue. I could finally compile and run my ‘Hello Wold’ project happily with both Code::Blocks and LinuxMakefile ( Ubuntu 18.04 ) . The problem is that those builds are x-shared-library mime type , and not x-executable , so won’t run . What should be the compiler flag to set to have builds as executable ?
Which version of JUCE are you using? Are you building the JUCE ‘Hello World’ example? I’ve just tried this on Ubuntu 16.04 and it builds an x-executable that can be run from both the terminal and the file browser.
I’m using Juce 5.3.2 on an Ubuntu 18.04 clean installation.
Taking a bit more attention , it seems on my side to depend on the compiler :
The GCC will build a x-shared-library , both from Code::Blocks and Makefile.
The LLVM will buid an x-executable on Code::Blocks .
The my question would be is there a way with Makefile to set a GCC flag in order to build a x-executable ?
I’m not sure. I’m using GCC too and it builds an x-executable.
Very sure there is since 16.04 and GCC versions a flag by default to be set to -no-pie…
Which version of GCC are you compiling against ?
here an old post
I’m on Juce 6.0.4 and have just started experimenting with some Linux builds and, after finding all required dependencies, I can successfully build my projects but am experiencing the same issue as the OP, all executables are seen as “shared library”. I know this is an old thread, but I’m wondering if any solution has been found to make the exectutables run normally on a double click.
Same here, when I compile with gcc it makes a shared library (that can be executed as an app from Terminal with the basic ./“name” command) but if I compile with clang it makes an executable.
I have the same Issue on latest Juce and Ubuntu 20.04 with latest GCC installed. make creates a shared library which is very annoying.
I tried the ./“name” from the cmd and it did work though! Thanks for pointing that out. Better than nothing
The solution is in the thread linked a few posts ago: Code::blocks and x/shared-lib app
You will need to add the
pie-related flags to the compiler and the linker.