x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Solved] Error: cannot find atlbase.h when compiling in VS2013 Express?

Hi guys,

When compiling the Unreal Engine 4 in Visual Studio 2013 Express the compiler errors because it cannot find the file "atlbase.h".

Any ideas what the issue may be?

Product Version: Not Selected
Tags:
more ▼

asked Mar 20 '14 at 12:34 AM in C++ Programming

avatar image

3dev
96 2 6 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

7 answers: sort voted first

So the UBT (Unreal Build Tool) should be detecting if Express vs. Non Express is installed, the ATL support wasn't shipped with VS Express.

Do you by chance have another full version of visual studio installed? That may be fooling the auto detection code.

VSAccessor.Build.cs

 if (WindowsPlatform.bHasVisualStudioDTE)
 {
     // This module requires atlbase.h to be included before Windows headers, so we can make use of shared PCHs.  This
     // module will always have its own private PCH generated, if necessary.
     PCHUsage = PCHUsageMode.NoSharedPCHs;
     Definitions.Add("WITH_VSEXPRESS=0");
 }
 else
 {
     Definitions.Add("WITH_VSEXPRESS=1");
 }
 

To work around it - you can probably comment all that out and just use

 Definitions.Add("WITH_VSEXPRESS=1");
 


more ▼

answered Mar 20 '14 at 12:42 AM

avatar image

Nick Darnell ♦♦ STAFF
6k 77 37 151

avatar image EF Mar 20 '14 at 12:52 AM

I have this problem and in my case I have a full version of VS 2012 installed. However, building solution in 2012 went ok without any errors.

avatar image Nick Darnell ♦♦ STAFF Mar 20 '14 at 12:54 AM

Looks like we need to come up with a cleverer solution :D

avatar image Nick Darnell ♦♦ STAFF Mar 20 '14 at 01:18 AM

Just checked Perforce - looks like it was fixed yesterday :) Should be migrated into GitHub in a few days; soon there won't be any delay! :D

avatar image Dwel Mar 20 '14 at 01:18 AM

I have VS 2010 and VS 2012 installed (full versions), and VS 2013 express. I have encountered the same issue.

What worked for me, using VS 2013 Express, was to comment out the large block and instead use:

 Definitions.Add("WITH_VSEXPRESS=1");
avatar image CreatureNZ Mar 20 '14 at 03:08 AM

This fix also worked for me with having VS 2010 Professional and VS 2013 express.

Many thanks

avatar image RandomTiger Mar 20 '14 at 08:19 AM

Same here, thanks

avatar image nesis Mar 20 '14 at 02:17 AM

To my understanding, UE4 was developed with Visual Studio 2012 in mind as the Windows IDE. Editing your code in it should be no issue. Jumping up to 2013 might introduce a few gotchyas, like you've found.

If it's no big issue, Visual Studio 2012 should be your IDE of choice at the moment, until better integration with 2013 is deployed.

avatar image Nick Darnell ♦♦ STAFF Mar 20 '14 at 02:23 AM

At Epic we've switched over to 2013. So it's definitely ready for it, this is just an issue with having Express and non-express versions installed side by side. It should be fixed as soon as we do another push to GitHub.

Cheers, Nick (Epic Games)

avatar image densohax Mar 22 '14 at 05:50 PM

See my fix below, I also posted a pull request on github for 2 fixes.

avatar image Nick Darnell ♦♦ STAFF Mar 22 '14 at 06:43 PM

Thanks Densohax, we have it fixed in mainline, there's actually a better set of DDE variables you can check in the registry. We haven't pushed the latest version to github yet...hopefully soon (eventually it will be realtime). We're also working on a hotfix that will resolve it in the release branch.

It's awesome to see people jumping into the code! :D

avatar image densohax Mar 22 '14 at 06:46 PM

Nice, I was also looking at some other ways to detect express but didn't find those DDE variables!

Btw, it's awesome to have access to the source ;)

avatar image Khetnen Mar 22 '14 at 09:40 PM

If I didn't clone the source from Github, will the launcher update with this when it is pushed to github?

avatar image Keehoon Ahn Mar 22 '14 at 07:49 PM

I was exhausted by that error.^^;;;; Thanks to you I solved~ ^^

avatar image kenshin1987 Mar 25 '14 at 08:01 AM

thank you solved

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The fix for this problem is to change UEBuildWindows.cs.

The property bHasVisualStudioDTE will return true if you have more than one version of visual studio (and one of them is not express).

The fix is to add a check for the environment variable VisualStudioEdition (which exists in 2013 express).

The function becomes:

 /** True if VS EnvDTE is available (false when building using Visual Studio Express) */
 public static bool bHasVisualStudioDTE
 {
     get
     {
         string envVSEdition = System.Environment.GetEnvironmentVariable("VisualStudioEdition");
         if (envVSEdition != null && envVSEdition.ToLower().IndexOf("express") != -1)
         {
             return false;
         }
 
         try
         {
             // Interrogate the Win32 registry
             return RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry32).OpenSubKey("VisualStudio.DTE") != null;
         }
         catch(Exception) 
         {
             return false;
         }
     }
 }


more ▼

answered Mar 22 '14 at 05:15 PM

avatar image

densohax
21 2 2

avatar image densohax Mar 22 '14 at 07:52 PM

Aren't you missing a } in your code?

avatar image Keehoon Ahn Mar 22 '14 at 08:13 PM

My mistake.T_T Your method have no problem. Thank you.^^

avatar image densohax Mar 22 '14 at 08:16 PM

No Problem :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Definitions.Add("WITH_VSEXPRESS=1"); works for me too, using express with full 2010 installed. thanks guys.

more ▼

answered Mar 20 '14 at 08:19 AM

avatar image

RandomTiger
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Thanks guys!

Commenting out the code as described above and leaving:

Definitions.Add("WITH_VSEXPRESS=1");

...worked for me too :)

more ▼

answered Mar 20 '14 at 06:55 PM

avatar image

3dev
96 2 6 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

There goes three hours of my precious compiling time...

more ▼

answered Mar 21 '14 at 01:46 AM

avatar image

ElGuapoGuapissimo
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This came in handy, thank you very much :)

more ▼

answered Mar 21 '14 at 11:13 PM

avatar image

MrNexy
139 14 15 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Ok Ive done this and still doesnt work....Im using a brand new machine so there are no other visual studio versions installed and I still cant build the solution for Unreal engine 4.7.1...what is going on?

more ▼

answered Mar 01 '15 at 10:50 PM

avatar image

Rodesqa
1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question