U++ framework
Do not panic. Ask here before giving up.

Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Visual Studio 2012
Visual Studio 2012 [message #37499] Thu, 11 October 2012 16:57 Go to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Hi fellas,

Most of you will already be aware of this, but for those who aren't, Microsoft has released the latest version of Visual Studio, very originally named 2012. Interesting new features, especially the extended C++11 support and the possibility to compile native code to work on the GPU with the C++ AMP technology.

Additionally, the Express (i.e. free) version includes both the x86 and x64 flavours of the compiler, unlike previous editions, and also OpenMP support.

So, you want to use VC++2012 with U++, you say? No problem. I spent some time fiddling with the options and managed to make the current version of theIde to work with it. It's not difficult, it just takes some time, so here it is for you:

From Setup/Build Methods, create a new Method and use MSC9 as builder.

Assuming you have installed VC on the default dir, the options are as follows:

PATH- executable directories:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Ide
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Vc\Bin
C:\Program Files (x86)\Windows Kits\8.0\bin\x86

INCLUDE directories:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Vc\Include
C:\Program Files (x86)\Windows Kits\8.0\Include\um
C:\Program Files (x86)\Windows Kits\8.0\Include\shared
C:\Program Files (x86)\Windows Kits\8.0\Include\winrt

LIB directories:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Vc\Lib
C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86


UPDATE: As pointed out by lectus, if you're running a 32 bit version of Windows, keep in mind that the first part of the path must be C:\Program Files\ in all cases, instead of C:\Program Files (x86)\


Voilą - you can now compile your U++ programs.

If you'd like to take advantage of the x64 compiler as well, the directories are these:

PATH- executable directories:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Ide
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Vc\Bin\x86_amd64
C:\Program Files (x86)\Windows Kits\8.0\bin\x64

INCLUDE directories: same as for the x86 version (see above)

LIB directories:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Vc\Lib\amd64
C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64


Hope this helps some of you.

Kel



PS: Get VS here

[Updated on: Fri, 14 December 2012 11:10]

Report message to a moderator

Re: Visual Studio 2012 [message #37512 is a reply to message #37499] Fri, 12 October 2012 21:35 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 312
Registered: October 2008
Location: France
Senior Member
Thanks Keltor for this very interesting information. Smile

If I am not wrong, you need Windows 8 to install VS Express 2012. Confused

Biobytes
Re: Visual Studio 2012 [message #37513 is a reply to message #37499] Fri, 12 October 2012 22:50 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
You're welcome BioBytes, glad to help.

Actually, even though VS Express (as well as the rest of VS versions) targets the new Windows 8, it can be installed on older Windows flavours, and the applications it builds are also compatible with those older versions.

If you follow the link from my previous post, you'll find several versions of Express to download. There is one that indeed works on Windows 8 only, but then there is one called "Windows Desktop" which is the one you probably want:

Quote:

Supported operating systems

Windows 7 SP1 (x86 and x64)
Windows 8 (x86 and x64)
Windows Server 2008 R2 SP1 (x64)
Windows Server 2012 (x64)


[Updated on: Fri, 12 October 2012 23:00]

Report message to a moderator

Re: Visual Studio 2012 [message #37514 is a reply to message #37513] Sat, 13 October 2012 09:36 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 312
Registered: October 2008
Location: France
Senior Member
Ok
Thank you very much Smile

Biobytes
Re: Visual Studio 2012 [message #38213 is a reply to message #37514] Thu, 06 December 2012 23:44 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Thanks Kel

I had one computer that would not compile the ide package with MSC9 or 10.
I followed how you setup the build method for MSC11

Worked good on the first try.
Re: Visual Studio 2012 [message #38291 is a reply to message #38213] Sun, 09 December 2012 10:50 Go to previous messageGo to next message
281264 is currently offline  281264
Messages: 272
Registered: June 2010
Location: Spain
Experienced Member
It comes in handy, indeed.

Thanks,

Javier
Re: Visual Studio 2012 [message #38333 is a reply to message #38291] Mon, 10 December 2012 23:38 Go to previous messageGo to next message
281264 is currently offline  281264
Messages: 272
Registered: June 2010
Location: Spain
Experienced Member
After some tests, the MSC 2012 do not seem to work fully well with TheIDE; for instance, it does not debugg correctly.

Javier
Re: Visual Studio 2012 [message #38377 is a reply to message #37499] Thu, 13 December 2012 02:29 Go to previous messageGo to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
It didn't work for me.

Sad
Re: Visual Studio 2012 [message #38378 is a reply to message #37499] Thu, 13 December 2012 03:02 Go to previous messageGo to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
Do you still need the Windows SDK for this?
Re: Visual Studio 2012 [message #38383 is a reply to message #38378] Thu, 13 December 2012 09:03 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
lectus wrote on Thu, 13 December 2012 03:02

Do you still need the Windows SDK for this?



It should work without the SDK since VS12 installs all the needed files. What presumably could give you some trouble is the location of the files themselves. If your Windows is in a different language than English, or if you install VS on a different directory from the default one, you may have to adjust the directories I provided on the first post accordingly.
Re: Visual Studio 2012 [message #38384 is a reply to message #38333] Thu, 13 December 2012 09:05 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
281264 wrote on Mon, 10 December 2012 23:38

After some tests, the MSC 2012 do not seem to work fully well with TheIDE; for instance, it does not debugg correctly.

Javier


That is true. In fact, I have had some trouble in the past with MSVC and debugging, not only with 2012. But compiling works fine for me.
Re: Visual Studio 2012 [message #38386 is a reply to message #38384] Thu, 13 December 2012 10:49 Go to previous messageGo to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
Hi!
I'm using VS 2012 Express on a brand new laptop. So I didn't have any VS version before.

It works now. I had I typo mistake.

BTW... it looks like that winrt folder doesn't exist here. It might be only available in VS 2012 Ultimate, but not in Express. I think those files are for WinRT (Windows on ARM) and not Windows 7.

Hopefully the infomartion we collect here will help the U++ developers including VS 2012 support in TheIde.
Re: Visual Studio 2012 [message #38387 is a reply to message #38386] Thu, 13 December 2012 11:10 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
lectus wrote on Thu, 13 December 2012 10:49


It works now. I had I typo mistake.



Glad to hear you sorted it out

lectus wrote on Thu, 13 December 2012 10:49


BTW... it looks like that winrt folder doesn't exist here. It might be only available in VS 2012 Ultimate, but not in Express. I think those files are for WinRT (Windows on ARM) and not Windows 7.



I am running VS Express and I had all those directories. I added them all as include folders just for completion, since they may be needed for someone, but if your version does not have them, then no problem.

lectus wrote on Thu, 13 December 2012 10:49


Hopefully the infomartion we collect here will help the U++ developers including VS 2012 support in TheIde.


Indeed Smile
Re: Visual Studio 2012 [message #38391 is a reply to message #38387] Thu, 13 December 2012 13:39 Go to previous messageGo to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
I just tested the following C++11 feature:

	Vector<String> v;
	v << "Item 1" << "Item 2" << "Item 3";
	
	for(auto s: v)
		arr.Add(s);


And it works great! U++ is already ready for these new C++ features. I didn't need to set up any additional compiler flag.
Re: Visual Studio 2012 [message #38401 is a reply to message #37499] Fri, 14 December 2012 01:50 Go to previous messageGo to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
One important thing to notice is that on Windows 7 32-bits the path is:
Quote:

C:\Program Files...


instead of
Quote:

C:\Program Files (x86)...
Re: Visual Studio 2012 [message #38405 is a reply to message #37499] Fri, 14 December 2012 11:05 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
That is very true. It slipped my mind since I've been on x64 for so long now. I'll update the first post. Thanks!
Re: Visual Studio 2012 [message #38467 is a reply to message #37499] Wed, 19 December 2012 12:54 Go to previous messageGo to next message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
There's a new update called Visual Studio 2012 Update 1.

It includes Windows XP targeting for C++.

I wonder how that affects U++ when using this compiler.

Does it mean that without this update programs will not run on Windows XP?
Re: Visual Studio 2012 [message #38701 is a reply to message #38467] Mon, 07 January 2013 23:15 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 656
Registered: March 2007
Contributor
Thanks!
Re: Visual Studio 2012 [message #38750 is a reply to message #37499] Sat, 12 January 2013 19:34 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
That works good. It will be a help when Upp includes support for 2012.

I updated the Upp build and should have renamed the Upp directory adding the build number. I usually do but this time did not.
Spent an hour or so trying to get it to work.
Got to an internet connection and got the data again.

One thing I noticed it is a little more picky on letting things slide. I had a few functions like:
string Func (.....)
String daa;
.......
return daa

no go.

had to change it to
String Func (....)

Thanks again Kel


Re: Visual Studio 2012 [message #39180 is a reply to message #38750] Sat, 23 February 2013 21:01 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 656
Registered: March 2007
Contributor
This is the 3rd time I have to refer to this post to set up for VS2012.

Upgrading upp will erase the build method. This time I'll make sure that I copy the bm file to a safe place.
Re: Visual Studio 2012 [message #39788 is a reply to message #38333] Sun, 28 April 2013 11:59 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Lance wrote on Sat, 23 February 2013 21:01

This is the 3rd time I have to refer to this post to set up for VS2012.

Upgrading upp will erase the build method. This time I'll make sure that I copy the bm file to a safe place.


That has happened to me a few times as well. I'm finding myself using U++ more and more, across all computers I have access to, so I need to re-create the VS11 options over and over. For everyone's convenience, here's a zip file with the MSC11 and MSC11x64 .bm files with the default options (as they appear in the first post).

Just unzip them in your upp folder (where your theide.exe resides).



281264 wrote on Mon, 10 December 2012 23:38

After some tests, the MSC 2012 do not seem to work fully well with TheIDE; for instance, it does not debugg correctly.




I have tried the debugger again with VS 2012 and it seems to work. I can set breakpoints, examine the variables, evaluate expressions and step the program execution, which is all I personally ask from my debugger. All this from within theide. I am running VS 2012 Express SP1 and U++ rev 6001.
  • Attachment: MSC11.zip
    (Size: 0.88KB, Downloaded 626 times)

[Updated on: Sun, 28 April 2013 12:03]

Report message to a moderator

Re: Visual Studio 2012 [message #39793 is a reply to message #39788] Mon, 29 April 2013 04:01 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
keltor, your initial setup was very helpful.

When updating Upp I just rename the upp directory to the build number like upp6000. Install the update. Open both up and copy the build data from the previous to the new.

The less thinking required the 'more better" I like it.

I copied from you initial thread and put it in a file upp_changes.txt along with what is necessary to keep the FindReplace from vanishing and useful tips from this forum.
Re: Visual Studio 2012 [message #40690 is a reply to message #39788] Mon, 02 September 2013 22:32 Go to previous messageGo to next message
281264 is currently offline  281264
Messages: 272
Registered: June 2010
Location: Spain
Experienced Member
Quote:

I have tried the debugger again with VS 2012 and it seems to work. I can set breakpoints, examine the variables, evaluate expressions and step the program execution, which is all I personally ask from my debugger. All this from within theide. I am running VS 2012 Express SP1 and U++ rev 6001.


I have tested the compiler in 32 bits and it works fine and it debugs fine as well; but when it comes to work with 64 bits, it fails and produces the following error message:

Error creating process
C:\upp\out\MyApps\MSC11x64.Debug.Debug_Full\prueba_vectors.e xe
Windows error: Solicitud no compatible (NON COMPATIBLE SOLUTION)

Have you got the same problem?

Javier
Re: Visual Studio 2012 [message #40699 is a reply to message #37499] Thu, 05 September 2013 08:28 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Same problem here Javier
Re: Visual Studio 2012 [message #40913 is a reply to message #37499] Mon, 07 October 2013 12:22 Go to previous message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
This topic is a bit obsolete now that there is "native" support for VS 2012 directly in U++; however, I have confirmed that the debugger still does not work in 64 bit version. Most likely, although I haven't looked at the code, it is trying to run the x64 debugger from a x86 executable, which AFAIK is not allowed.

File as bug?
Previous Topic: [Solved] Default compiler flags
Next Topic: Feature request: build flags to resource compiler
Goto Forum:
  


Current Time: Sat Apr 25 18:51:23 GMT+2 2026

Total time taken to generate the page: 0.00750 seconds