4

I'm using Qt 4.7.4 as C++ framework, Netbeans 7.0 as IDE and MinGW as C++ compiler.

These are integrated well due to Netbeans ability and I'm coding my projects with them easily.

I know in Qt Creator, we can switch to Visual Studio as C++ compiler very easy.

But, how can we use Visual Studio as C++ compiler in Netbeans which works with Qt framework?

Is there any Netbeans plugin or some configuration for it (then, Only F6 to run)?

Note: As mentioned in comments (Cat Plus Plus), it's related to QMAKESPEC or -spec. and i'm searching for a solution via Project > Properties > Qt > ...

masoud
  • 55,379
  • 16
  • 141
  • 208
  • 1
    If the integration means it's using `qmake`, then it's a matter of choosing another makespec (via -spec or QMAKESPEC environment variable). – Cat Plus Plus Oct 15 '11 at 15:04
  • As Cat says, qmake is the way to go. I would point out that you don't want to compile with Visual Studio, it's Visual Studio's C++ compiler which you're after ([see this link](http://msdn.microsoft.com/en-us/library/f35ctcxw(v=VS.100).aspx) for options available) – Samuel Harmer Oct 19 '11 at 08:37

1 Answers1

1

You might try using qmake -spec win32-msvcXXXX where XXXX is from {2003, 2005, 2008, 2010} and matches your version of Visual Studio.

I would, however, expect that you will have to rebuild Qt for Visual Studio. The MingW libraries will not work with Visual Studio. The answers to How to Build Qt for Visual Studio may help here. [I freely admit to never trying this.]

Community
  • 1
  • 1
jwernerny
  • 6,978
  • 2
  • 31
  • 32