Using Eclipse (with Debian) to modify applications from the official repository - linux

For a university project, I am trying to find a not so cumbersome way to effectively modify certain applications from the official Debian repository, such as eog. I want to clarify that I am unfamiliar with Linux and GTK. My idea was to be able to work comfortably in terms of finding variable and function definitions, trying step by step debugging while getting used to gtk+ and the application's source code. I tried to understand the code while working from the terminal, but in my opinion, it was a pain i* t** a**.
So far, I managed to install the application's build dependencies with
sudo apt build-dep eog
and I received the source-code with
apt-get source eog
After I installed eclipse, I tried to get gtk+ running with the minimum example from the gtk+ reference manual. I found a very useful easy explanation here. It's the answer from Wed, 04 November 2015 12:51.No problem so far. So in theory, I should be able to write GTK+ applications in Eclipse. But when I am trying to make a new project and include eog's .src and .h files, I am running into a mass of unresolved inclusions, missing header files, undefined references etc...
So I wanted to ask: Did anybody work on similar tasks and can provide some help? Or: Does anyone have a better idea maybe?

If anybody should come across this ever again: I found an alternative solution: When you download the source-files of eog, you will come across the meson-build system. Eclipse supports C meson-build projects. I just copied all downloaded source files into the meson-build project in eclipse in could compile it right away.

Related

How do I build Nim library packages

I've created a nimble library package as per the documentation. When I try to build it using nimble build I get the following error.
Error: Nothing to build. Did you specify a module to build using the bin key in your .nimble file?
I can do this and it does fix the error but according to the documentation adding the bin key to the .nimble file turns my package into a binary package.
Other things I have tried:
Use nimble install: This does not appear to verify that my code will actually compile and will happily install anything to the local package directory (I added a C# class to my .nim file, for example, and it was successfully installed).
Use nimble c: This works but I have to pass in the path to the nim file I want to compile and the binDir entry in the .nimble file is ignored resulting in the output being placed in the same directory as the file being built. This complicates the development cycle because I have to manually clean up after the compiler.
Use the compiler directly. This is pretty much the same as the previous option with the same flaws.
I guess I could also create a separate .nim file and import my library after it is installed but this is a big overhead for just wanting to verify that a package in the early stages of development will actually compile.
I just want to be able to verify that the source code in my library package is syntactically correct and will compile. How is this meant to be done for library packages?
From your provided link to the nimble package manager documentation I have the feeling that
https://github.com/nim-lang/nimble#tests
is what you are looking for. But I have never used the test command, so I am not sure. I do my test manually still, I read the nimble docs maybe 4 years ago and can not really remember. And currently there is much package manager related work going on, I heard there is a new, alternative package manager called nimph, and from a forum thread I think I read something that nimble is going to change and improve also. Maybe you should consider subscribing to the Nim forum, that is the place where the bright Nim devs are. Well, at least a few of them.

AHBot in an AzerothCore 3.3.5 Server

Does anyone have a guide on setting up AHBot in an AzerothCore 3.3.5 server? I can find no mention of ahbot in the world.conf and no DB tables like auctionhousebot in the database or any references. It is included in TrinityCore so all the google references that I find point me back there.
Our server is just two of us and it would be nice to have some items on the auction house. At the moment, if you need a silver bar you have to go out in the world and find it. That was exciting the first couple of times... but gets old.
I followed the guide to install off github: https://www.azerothcore.org/wiki/Installation and am using the latest release under Ubuntu linux.
Thank you for any help. You are my last hope...
AHBot is not currently an 'official' supported module of AzerothCore (which would be why you aren't finding any settings in the worldserver or anywhere else regarding it).
There is a module in development that isn't currently part of the AC list, but I've gotten it working on my personal server: https://github.com/AyaseCore/mod-ahbot Note that this is a bit different than a normal module as there is also a git patch that needs to be applied manually.
Theres a module in azerothCore repository you have to apply patch manually but it wont compile on Win x64 and unix x64 comes up with an error about 9 arguments, but seems to compile for some

Deploy a Qt project on linux

This may be a noob question, but I have been stuck trying to work out how to statically build my qt project on linux. I tried doing what it said on http://doc.qt.io/qt-5/linux-deployment.html , but I do not understand the 1st step. When I cd to the location of my qt project and run
cd /path/to/Qt
./configure -static -prefix /path/to/Qt <otherparameters>
make
it says no such file or directory. Am I misunderstanding what paths I need to use? I want to make my qt project a stand alone executable which doesnt require the computer it is on to have qt. I have read about dynamically linking the libraries, but I dont really know what to do with that either. The deploy option is greyed out in qtcreator, is there a way to use this?
Thanks
/path/to/Qt should be the path to Qt's sources, not your project's. That section of the documentation is about building Qt statically, which you must do before trying to statically link your application to Qt. For example, if you downloaded/cloned the sources to /home/jxb458/qt5, then you'd replace /path/to/Qt with that:
cd /home/jxb458/qt5
./configure -static -prefix /home/jxb458/qt5/qtbase
make
Static linking is great when it works, but it can be an effort - I have found especially when using GUI. As Mitch said you need to actually re-build the Qt source code
I made some notes back when I was building statically quite a bit here: Notes on static building (derived from many sources) they should at least point you in the right direction - you can probably ignore the part about installing Ubuntu - the notes assume a new install.
However I have more recently returned to the dynamic linking deployment since I feel this is a better way to deploy now. You don't need to install Qt on the target machine you just need to collect the qt dlls and copy them with your application (using ldd executable-name which produces a list of dlls you need - but just take the Qt ones not the system/generic ones). For plugins you need to do a bit more (but its fairly simple). I even wrote a bash script to do this automatically (i'll send it to you if you need it), in windows there is a qt script called windeployqt (not sure why there is not a linux variant).
If I where to start again looking into deployment I would go for dynamic linking. Maybe try with a simple project to start with (like a hello world proj).

When using someone else's application code do I need to run Cmake to get the project structure for my operating system.

I am getting into a position where I have to use other people code for projects, for example openTLD. I want to change some of the code to give it more functionality and use it in a diffrent way. What I have found is that many people have packaged their files in such a way that you are supposed to use
cmake
and then
make
and sometimes after that
make install
I don't want to install the software on my system. What I am looking to do is get these peoples code to a point where I can add to it in Eclipse or even just using Nano and then compile it.
At what point is the code in a workable/usable state. Can I use it after doing cmake or do I need to also call make? Is my thinking correct that it would be better to edit the code after calling cmake as opposed to before? I am not going to want my finished code to be cross platform supported, it will only be on Linux. Is it easer to learn cmake and edit the code befor running cmake as opposed to not learning cmake and using the code afterwards, if that is possible?
You question is a little open ended.
Looking at the opentld project, there is a binary and a library available for use. If you are interested in using the binary in your code, you need to download the executables(Linux executables are not posted). If you are planning to use the library, you have two options. Either you use the pre-built library or build it during your build process. You would include the header files in your custom application and link with the library.
If you add more details, probably others can pitch in with new answers or refine the older ones.

How to develop in Linux using GNU toolchain, coming from Java?

I'm a good Java programmer, albeit the first languages I learnt were C/C++. Anyway, for work reasons, I switched to Java and web languages. Sometimes I get interested in this or that Linux project, usually coming as a git or svn repository... The problem is that I usually clone the repo, I try to configure it, I install all the needed libraries (and this takes ages), maybe finally I succeed... but then make fails or configure itself fails, complaining about some tool that is missing. Or maybe I installed two versions of the same library and the configure script gets the wrong one, or boring problems like this.
Anyway, I see loads of people using those tools everyday, so it must not be so difficult after all!
Can you point out resources that may help in the first steps?
Thanks
What you are referring to are known as autotools and make
autotools are used to generate scripts and build files that can be used to build as well as install a program/package/software (whatever you call it)
Here is wikipedia link for the GNU build system in general.
And refer to this link for details about the autotools and related stuff
It may take longer, but if you are interested in how to fix those problems yourself I recommend learning how autoconf and automake work. I made a positive experience with the book "Autotools: a practitioner's guide to Autoconf, Automake and Libtool". I read the dead-tree version but it is also available online: http://fsmsh.com/2753.

Resources