IDE for running, debugging, developing OrthanC

Hello Authors,
I am using linux (Ubuntu) and trying to debug and develop some my own features on the original OrthanC source code. Running and debugging OrthanC, however, using gdb is such a nightmare since I cannot build, run OrthanC source code in well-known IDE like CLion. I am not sure which kind of IDE you are using to develop/ run OrthanC ?

Thanks,
Phong

Hello,

I personally develop the Orthanc ecosystem on Ubuntu 18.04 LTS, using emacs, cgdb and valgrind.

But this is not necessarily the answer you expected :wink:

From time to time, I use the debugger from KDevelop if problems related to threads are involved. Other people in the Osimis team use Qt Creator and Microsoft Visual Studio Community 2019.

Sébastien-

Hi, Phong!

Even though Emacs is my $EDITOR of choice for anything Linux, I use CLion for the Orthanc based project I’m working on.

What are your experience with CLion/Orthanc? We can setup a call so I can show you the way around setting it up.

The only thing I had to tweak was the cmake parameters since I need to use the ALLOW_DOWNLOADS. Also, I like to use the “-j 5” while compiling to speed up the process. CLion can debug, add breakpoints, etc without a problem.

Sadly I haven’t had such luck with other IDEs. Except Sublime, which was what I used to code in until not long ago.

Again, let me know if you’d like help in setting up CLion and I’ll be glad to help!

PS: I’m currently running openSUSE Leap 15.1

Best,
Luiz

Hi, Phong!

We can certainly setup a call. My timezone is GMT-3, what is yours?

From your logs it shows you need to install the development package for sqlite3. Since this is one the first libs to be tested, you might need the remaining ones.

This is an excerpt from a Dockerfile I use to compile Orthanc on distros other than Debian Buster. So if you want to compile on, say, CentOS or Fedora, you’ll have to look for the right package names (they usually go like “sqlite3-devel” - notice no “lib” prefix and “devel” instead of “dev” suffix):

locales dialog gdb build-essential unzip cmake libc6-dev uuid-dev
libcurl4-openssl-dev liblua5.1-0-dev googletest libgtest-dev libpng-dev
libsqlite3-dev libssl-dev libjpeg-dev zlib1g-dev libboost-all-dev
libwrap0-dev libcharls-dev doxygen build-essential fakeroot
devscripts libdcmtk-dev libdcmtk14 liblog4cpp5-dev libpugixml-dev
libjsoncpp-dev postgresql-server-dev-all libgdcm2-dev
mercurial gosu emacs-nox luarocks npm

I have highlighted the *-dev packages which are the ones you absolutely need. There are other packages but they’re more tunned to the needs of the project; for instance, there’s luarocks and npm because of testing lua scripts and compiling the opensource’d Osimis’ Viewer. The Boost ALL is kind of an exception to the rule; you don’t need all of if, it’s just specifics of our project. Also, you’ll want to compile googletest manually like so:

mkdir /usr/src/googletest/build

cd /usr/src/googletest/build

cmake …

make all

make install

Do notice the use of “#”. That means you’ll want to run these commands either as root or through sudo.

I can’t really talk today, but I can check back on e-mails every now and then (busy day, company event, etc). Let me know if you still need help so we can setup the call.

Best,

Thank you Luiz,
I’ve managed to compile orthanc. The reason for the last failed build is that my intellij’s default compiler is pointing to incorrect gcc (which is too old). So I changed the path and it works. Again thanks a lot to you.