I am using Opensuse Leap 42.3, with KDE Plasma 5.8.7 which uses Qt 5.6.2.
I would like to use the latest Qt version (5.10 as of asking this question) for development, and I've installed it in /usr/local/Qt5.10/.
I added Qt5.10 library path (/usr/local/Qt5.10/5.10.0/gcc_64/lib/) to my /etc/ld.so.conf but it caused a conflict with system's Qt version, which as a result anything using Qt libs (Dolphin, Kate, etc) won't work, and if logged out, cannot login, complaining about qdbus.
I tried to create symlinks in /usr/lib64 like this:
for f in /usr/local/Qt5.10/5.10.0/gcc_64/lib/libQt5*.so.5.10; do
ln -s $f /usr/lib;
done
But this too, made the same problem. I have also added a LD_LIBRARY_PATH entry in ~/.profile but with the same problem.
I can do export LD_LIBRARY_PATH="/usr/local/Qt5.10/5.10.0/gcc_64/lib/" in a terminal and run my Qt5.10 application, but this is not convenient.
What is the correct way of doing this?
It may not be convenient, but setting the path up as you launch seems to be the only way to avoid the issues you mention.
I also use KDE, and am playing with Qt 5.10 visualisation stuff on a system using Qt 5.9 and have experienced the hell of mashed library dependencies you mention.
Qt Creator seems to take care of that and in other environments (eg: KDevelop) you can add it to the path in the run/debug launch settings. And although not portable, you could also add it to the path for your desktop file...
The qtchooser utility might be useful although I admit I don't really understand how it's supposed to work.
Yes, I realise this is a low quality answer but I am interested in seeing a better solution too.
I program a embedded Linux on a separate target. For that I use Eclipse as a editor and the powerpc-linux-gcc.
That's a bit uncomfortable.
Is it possible to use a powerpc-linux-gcc in Eclipse?
Yes, but you want to install (via Help -> install new software -> from all available sources -> Mobile and device development) C/C++ cross compiler support and possibly C/C++ GDB hardware debugging.
When you start new project, selecet C or C++ project, then Executable, then "empty project" (or something else) and then make sure, in to selecet "Cross gcc" in right listbox. Press Next button until the page with cross compiler prefix and path shows. There you need to enter prefix (powerpc-linux- in your case) and you can also select your compiler's directory (if you have not added it to path).
When you have project set up this way, selected toolchain is used to build. You can alse set up "GDB hardware debugging" session to debug your application remotely.
I am makeing a small mod to SMPlayer; the Linux version...
The make, sudo make install from the command line works, but I would like to have the project in an IDE.
I want to use CodeBlocks IDE, only because I've used it before, but if some other IDE is required, I can use that instead... (I use Codeblocks because it is simple, and that suits my current ability to handle an IDE)..
Is there some way to use SMPlayer's Makefile, or some such thing?
This depends on the IDE and has little to nothing to do with Linux.
Does your program come with something like cmake or another setup tool? That normally makes it much easier. For example in KDevelop you can import straight from CMakeLists.txt and Makefiles.
If all else fails it might be quite easy to do something like this (not knowing your specific IDE):
Add new Project
Set build directory and other necessary settings (like compiler and compiler flags)
Add the already existing files to it.
Press "Compile"-button.
This is obviously depending on the project structure, setup and size.
Code::Blocks has builtin support for Makefile projects. See the FAQ.
Also you could just use vim or emacs ;)
Since Emacs and VIM are just text editors, does that mean I have to copy paste the code into an IDE so it can be compiled?
Well you edit your files in emacs or vim. Then you save them and then you invoke the target language compiler.
Typically, C projects would use Makefiles that are meant to track down the files needed to be compiled into a program, and their dependencies. Then you typically type make in the command line and make reads the Makefile you authored and takes care of invoking the compiler on the files etc...
For Java, people often use Ant or Maven to build their software.
...I know that my answer is vague, the list of languages and build tools is long, you should narrow down your question.
Very often, under Linux, when I don't need a massive IDE, I'm using Pida. It brings me a list view of the different Vim buffers, a convenient treeview of the filesystem and a shell: see screenshot.
See:
GNU Make
CMake
Autotools
Ant
Maven
[insert your favorite build tool here]
Text editors just edit files.
Compilers just compile files.
IDE's just bring files and the compiler together in a convenient way.
So... No, you don't need to copy/paste the code into an IDE, however you do have to make sure your compiler (IDE in your case) knows where to find the file you want to compile.
You don't need an IDE to compile a program. You just need a compiler. Emacs/Vim are text editors that allow you to write your program. You then call the compiler and it will do the compilation.
Also, Emacs and Vim are scriptable and have routines that allow you to call a compiler directly on the file you're editing.
In vim, you type :make. In emacs, you type a M-x compile-frobnicate style command which I'm sure someone will provide.
Apart from what already has been said, take a few tutorials to learn how to code/compile with vim and Emacs:
Intro to C/C++ Programming with vim
Using Emacs for programming
In VIM (with no extensions installed) something like
! /path/to/make (C/C++ world)
or
! /path/to/ant build (Java world)
It depends on your compiler, platform, and program. Most, like gcc, can be called from the command line (or from within either of those editors) although you may have to first write a makefile for the linker. Other compilers are integrated into IDEs (or are difficult to control externally), although even these won't require copy/pasting. Simply save your program and open it from within the IDE.
So far: IDE = a poor editor + compiler + debugger + other_unnecessary_stuffs
Go get a compiler and a debugger and you do not need an IDE anymore
Many IDEs can detect if the source file is changed by an external program, and prompt you to reload. I know this is the case with MS Visual Studio and CodeWarrior.
This is useful if your project is already managed by the IDE and you don't want to move it to something like Make, for example if you're on a team who mostly use the IDE, but you want to use a different editor. Simply edit and save the file in vim or emacs, switch back to your editor and hit Compile.
No, you don't need an IDE to compile code that you write in emacs.
I use emacs very extensively for building .NET code in C#.
The .NET runtime includes compilers.
I downloaded the .NET SDK, which includes other tools, like nmake, msbuild, XML tools, debuggers and so on.
I grabbed csharp-mode.el, which teaches emacs how to highlight and indent C# modules.
C-x C-e , for me, runs the command compile. I type in msbuild there, and emacs runs the build, using the .NET SDK tools.
I do something similar with C code, and with Java code, and with Javascript.
The same idea will work with other languages as well.
For Visual Studio integration, I highly recommend ViEmu.
It basically turns the editor in VS into Vim. I use it every day at work, and it is very stable. I can't imagine working without it!
(source: viemu.com)
I'm working on a website that requires a flash mp3 player. I have absolutely no idea the procedures from messing with flash/actionscript/flex etc., however I need to edit the flash very slightly (I need to add two lines of code). There are a multitude of tutorials out there for setting up a flash (or flex or whatever) development environment but, as my needs are so simple, I'd like to go a little more light-weight than that (also, many seem outdated). I guess what I'm saying is I'm looking for a simple way to recompile some existing actionscript (command line is a plus!). Does anyone have a trick up their sleeve to accomplish this?
Download the free/opensource Flex 3 SDK. This includes an ActionScript3 compiler. Run the compiler like this:
mxmlc MyAs3File.as
There's MTASC for ActionScript 2.
You can compile it online here: http://wonderfl.kayac.com/. No mess that way.
I also wanted to say that swftools has exactly what you need. There is a swfc compiler which will compile as2 files. I would really recommend updating the source though. AS3 is much faster than AS2 and there are a lot of tools out there for example mxmlc and fcsh included in the open source Flex sdk. If you are looking for a full blown IDE there is a linux version of Flash Builder that was released as an open source port ... there are a couple other ones out there as well.
General Linux
On linux you can get the source from swftools.org.
Debian / Ubuntu
On debian / ubuntu you can run
apt-get install swftools
Mac OS X
Not exactly 'linux' but on mac OS X if you have homebrew installed you can do:
brew install swftools
Great, but how do I compile the code?
One this is installed you should have a new utility that you can use to do:
as3compile MyAs3File.as
Gotchas
Please note this is not a 1:1 replacement for Adobe's compiler - there are some things that it does not support ( see documentation, FAQ, changelog at swftools.org ) but it worked well for compiling my simple actionscript.