I need to implement some graph partitioning algorithms for my thesis. I have mostly Windows experience. I would like to know if it is hard to migrate c++ console program to Linux. I want to program it on Windows but I want to test and compile it on Linux as well. It will be pure cli application, with no use of windows APi or anything. I just need to use some external libraries. Specifically GNU linear programming kit and GNU scientific library GSL. I found out, there are windows versions of these libraries, what does it mean for me?, should I compile it on Windows with windows version package and on Linux with linux package. I would like someone to bring a bit clarity to this, I am really not very experienced programmer, so any advice will help. Also I would like to ask, if there is diference if I use Visual Studio for programming or some other IDE in matter of portability issues. Thanks in advance for any help.
The first thing to remember is that, although C++ source code can be ported between Linux and Windows, the compiled binaries can't be exchanged (at least not without using emulation software).
To create a portable application, your best option is to stay with standard C++ code and portable libraries. For the libraries, you can either build them yourself from source or you can use pre-built versions. In the latter case, you should make sure that you install the same version of the library on each platform to avoid hitting incompatibilities due to the different versions.
To ensure your code stays portable and you don't accidentally start using compiler-specific constructs, I would advise you to regularly compile your code for both Windows and Linux. That way you will get an early warning instead of having a pile of work at the end.
Note that you can cross compile using GCC, with the right flags and compiler options, and an install of mingw, you can compile Windows binaries on Linux (obviously you won;t be able to run them on Linux unless you install wine)
For a command line app, you should be ok - it depends how many Windows-specific system calls you make that will have to be replaced with Linux equivalents, though there are a few cross-platform libraries that might support these calls.
For cross platform development If you are looking for a cross platform IDE, you'll need to dump visual studio for one of the other ones. For C++, there's Qt Creator or Code::blocks both of which work well on Windows as well as Linux.