Monday 20 April 2009

Qt Creator or Visual Studio 2008

I have been using Visual Studio 2003 for a long time now - since it first came out in fact. It has performed it's job well. The random crashing of Studio 6 seemed to have been resolved and the autocomplete worked (75% of the time) Intellisense was still a bit of a nightmare but overall I lived with it quite happily.



In the last year, more and more often sample projects and code would not load in my vs2003 so I started looking for alternatives. Although I use Eclipse for Flash and the horrible java, it just uses far too much memory to be a decent c/c++ IDE. My machine doesn't have that much memory and Eclipse easily gobbles up over 500MB.

Qt Creator is really good. It has a nice clean interface  and fantastic autocomplete. The integrated debugger works very well too. The problem is that it isnt very easy to change it from its default compiler and if you do so its integrated debugger stops working. I also could not work out how to get it to highlight and compile .cu files with the nvcc compiler.

As vs2003 treated me well in the past I decided to bite the bullet and purchase VS2008 Standard Edition today from http://www.polyhedron.com/ . Wherever possible I try to support local companies and their service via email has been really good. It will hopefully arrive tomorrow. Apparently CUDA needs a few tweaks to make it work in the new visual studio but nothing that appears too time consuming. I will report more on the CUDA integration and general usefullness of the product in the coming weeks.

9 comments:

  1. I have ported one progject from MinGw to Visual Studio Express 2008. When trying to distribute the executable I learned that you have to install a new runtime on every target. There is a merge module containing the runtime. The merge module is not available for common installers like NSIS.
    Result:
    You can not simply distribute Visual Studio 2008 Executables to Microsoft platforms. Microsoft uses you to drive the API forward.
    No thank you. I am not going to touch that crap again!

    ReplyDelete
  2. I didn't want to reply to you until I'd tried out Visual Studio 2008.

    You are correct, VS does link to its runtime. But its done this for some time. Where I work we always have to package the runtimes into the installers but its not a really big issue at all, although we do use commercial installers and not NSIS. Linux has similar problems with all the dependancies - in fact I think Linux is worse especially when you trying to build something that relies on another library->lib->lib->scream!

    I use minGw (gcc and gfortran) under windows and it works well. Actually I often build my Code in VS using the gcc compiler. Then you dont get strange linkings in the .libs.

    Trying to link a VS C object file to something created with gcc / gfortran is very tricky so better to pick method for a project. Of course nvcc doesn't like to work like this on Windows.... (subject for a post I think)

    ReplyDelete
  3. Hi,

    I'm very interested in using CUDA integrated in Qt Creator. I have searched a possible solution on the internet but I haven't found any yet. Has anybody solved this?

    Regards,

    LUI

    ReplyDelete
  4. Hi Luis,

    On windows, the QT creator uses the mingw compiler and I couldn't seem to change it to use nvcc. Even if you could, nvcc won't invoke anything other than cl (microsoft c compiler) as the foreign compiler on a windows machine even if you specify the path and mingw in the foreign compiler setting.

    In unix it will happily use the mingw or other compiler.

    I gave up trying to get the windows QT creator to compile cuda code directly. So I either use the visual studio QT plugin or just compile outside the IDE. Most of the time now I use windows for the IDE/environment and compile on my linux box anyway.

    It's a bit of a shame as QT creator is rather nice :)

    I havent tried it for a while though - so maybe they have an update?

    /Barrett

    ReplyDelete
  5. Hi Barrett,

    Yes, you're right, it's a shame, because I like Qt Creator. It doesn't seem to be any update for that. I already use CUDA with VS but I was looking for something multiplatform, so maybe Codeblocks or Eclipse are a better option at this moment... :-/

    ReplyDelete
  6. Hi Luis,

    Qt creator would have been ideal as it is cross platform. My way of coding on the windows machine but compiling on the Linux box is far from ideal but it works.

    Makes debugging on the linux machine rather hard though...

    Let me know if you find any compromise - I would be very interested.

    /Barrett

    ReplyDelete
  7. Yes of course. If I find any solution to it for Qt Creator I'll post it here, but meanwhile I'll try mixing CUDA, C/C++ and Qt in Codeblocks or Eclipse, which seem to handle with that. I still haven't used them but there is always a first time for everything :-)

    ReplyDelete
  8. If you want to compile CUDA and C++ / QT ... whatever code and use Qt Creator you can use CMake as buildtool ... it works ... http://www.cmake.org/

    ReplyDelete
  9. I've the same problem with the Syntaxhighlighting ... i want that Qt Creator uses the C++ highlighting for .cu files ... Did somebody know how can can tell Qt Creator to open .cu files with the C++ Editor ?

    ReplyDelete