#Build error with visual studio / first time installation

1 messages · Page 1 of 1 (latest)

spark remnant
jovial hill
#

Let’s try something a bit more valuable than just fixing the error.
Let’s learn together how to approach this. First, let’s analyze the keywords: Visual Studio 2022 or higher. The second keyword indicates not found, which means it’s not installed. What do you think our next step should be?

keen nest
#

I think this error also happens if you have installed VS, but not the Workloads, as described by documentation

sacred oracle
#

We should improve the message box

#

but yes, when you install visual studio, the default options do not install C++ at all

#

you have to check those "for game dev" and "for c++ app dev" kind of checkboxes in the "what parts do you want?" section

spark remnant
spark remnant
#

I'm hoping it's just one of these options isn't selected that should be

sacred oracle
#

you also need to make sure if you're on the latest Visual STudio (2026) that you use CMake version 4.2.x or above

#

and when you type cmake --version on the command line its the one you think it is

spark remnant
spark remnant
#

I get home in 15 and will double check the version

#

I’m assuming that maybe it’s just too new of a version maybe

sacred oracle
#

so weird, that should be all required

#

tested with latest cmake & vs2026

#

I also tested it with cmake < 4.2.0 and it definitely does not work

spark remnant
spark remnant
sacred oracle
#

shoudl be ok. I recently set it up and the only reqs were vs 2026 with those c++ packages added, and cmake 4.2.1

#

you could always do it manually

#

that graphical project manager is actually just executing cmake command lines from the project's folder for you

#

specifically, its doing
cmake -S . -B build/windows
and then
cmake --build build/windows --config profile

#

it saves you typing but doing so manually might indicate what the problem is

spark remnant
crude summit
# spark remnant

Yeah that was not an appropriate response.

Best of luck! I hope this clears up fast.

spark remnant
#

ive tried both unreal and unity and both are quite cumbersome but o3de seems like a good fit so here's to that

#

just need to get past this build error

crude summit
#

Once I broke in, I've been having a blast using it. Have made tons of features and hundreds of components.

#

I cant see if you mentioned it. What version of VS do you have?

spark remnant
#

i've made a few games on roblox, and for my first project i'd love to port it to o3de and release but i know that's WAYS ahead from now, i'd like to just create the systems or "gems" necessary to do so

#

2026

crude summit
#

So if you go to the Project Manager > and click the hamburger on your project > open cmake gui

#

Does the current generator say 2026?

spark remnant
#

it does not

crude summit
#

If not, you can [Config] > [Generate]. It should update that.

spark remnant
#

it does say 2022

crude summit
#

I think that's your problem. 👌

spark remnant
crude summit
#

Bah.

#

One second, let me grab the cmd command.

spark remnant
#

i deleted the project and created a new one (for the like 5th time)

#

and cmake gui didnt error this time

crude summit
#

Good good.

spark remnant
#

i'm assuming that, had i just downloaded 2022 instead for example it would have worked just fine

crude summit
#

Yes.

#

But Microsoft force depreciated it.

#

It's half impossible to find a version easily.

spark remnant
#

depreciation is typically why i always go for the newer stuff

#

which isn't always best case

crude summit
#

Yeah, it was within the past few weeks, so we've been having your case crop up so much. But it was because they forced this upgrade down our throats.

#

Looks bad on us, but has really nothing to do with us. We've had to react and try to put out fires because of it.

spark remnant
#

to be fair, all engines i've messed with have always had some initial error and just never work out of the box usually of no fault of their own

#

trying to compile unreal engine for example, etc same with unity when building

#

many different installs of windows or variations of linux

crude summit
#

Yeeah. It's always a pain at the first contact point. I have so much fewer issues than people usually coming to the support forum and I grieve, as once that gets cleared up, you'll just forget those issues ever occurred.

#

Did your config go through?
Generation?
Were you able to build the project?

spark remnant
#

if it's ok i have a few follow up questions relating to this

crude summit
#

Yeah sure.

spark remnant
#

it seemed to work, but couldnt figure out what to do from there so i deleted the project and made a fresh one again just to test if its updated for future ones too

#

so first,

#

this always pops up with new projects

#

first word i know is project name, but is the pop-up normal to happen every instance?

crude summit
#

Yeah, it's because the project files are created, but it hasn't actually compiled the project.
It will also happen if you change the Gems or engine ref in the project settings.

spark remnant
crude summit
#

Like Unreal Engine, any C++ code creation requires a recompile (which is why LUA and Script Canvas are so helpful.)
So when you're doing C++ development you're regularly:

  • Write code edits
  • Close Editor
  • Build
  • Open Editor.
spark remnant
#

here's a 40 second clip of everything

crude summit
#

Okay, from this point:

  • Open up your project directory, and open CMD from there.
spark remnant
crude summit
#

And then put this command in: cmake --build build/windows --config profile

#

You already configured the environment with the GUI so you SHOULD be able to build.

spark remnant
#

seems to have worked

#

some yellow text but no red

crude summit
#

Okay awesome. I think that warning is literally cosmetic. Making a check without considering 2026, so then it fails no matter what.

#

Yeah that should be fine.

spark remnant
#

ah, okay

#

😂

#

i don't know if it makes sense to do this in the project menu but

#

maybe another option to select visual studio path here?

crude summit
#

Not a bad option for consolidation.

spark remnant
#

so, in the future until a later fix is implemented

#

just follow above instructions?

#

to build or use cmake?

#

i guess, i could also uninstall it all and look for the 2022 version

#

also, i appreciate all the help

#

to be honest, i thought it came down to a version issue after i read thoroughly through the docs you guys have (seriously) put time and effort into actually being easy to follow

#

thats why the first guy caught me so off guard 😂

crude summit
#

Yeah, you'll do above for new projects. Or just use the command if you're re-building.

You can put this .bat file in your project and just run it whenever you need to rebuild: https://github.com/GaianHelmers/O3DEIntensivesResources/blob/main/Setup VSCode/O3DE VSCode bat Files/Project bats/z_build_project_editor_profile.bat

But if you're only using editor and stuff you should have no need to rebuild. Only if you change gems.

GitHub

Resources for my O3DE Intensives Tutorial Series. Contribute to GaianHelmers/O3DEIntensivesResources development by creating an account on GitHub.

spark remnant
#

I don't how how possible it'll be with o3de, but my idea is to quite literally only touch lua and maybe the visual scripting you guys have but I'm not a fan of those systems anyways just because of how spaghetti they can get

crude summit
#

Yup, you should be able to do much with LUA.

There's a "Script Only" install type to prevent the need to compile at all.

crude summit
#

I'm not exactly sure how you use it, but you can always ask on the server.

spark remnant
#

I appreciate it

crude summit
#

spark remnant
#

I have another question to ask but I'd take it to dms from here on

crude summit
#

Sure.

sacred oracle
#

we probably need to fix the o3de project manager

#

if its "forcing" vs2022 on the command line

#

it hsould actually not specify the generator, cmake should be choosing the latest by default

#

script only project mode is a differnet project template
it sneakily replaces all c++ compile commands with no-ops

crude summit
still shell
#

I was running into this issue as well the last couple of days, I still couldn't build it after running the cmake command though.
However the new version (25.10.2) fixed it completely, thanks for the amazing work flex