Jump to content

Leadwerks 4: C++ error: reference to 'Window' is ambious


tipforeveryone
 Share

Recommended Posts

Thanks for your reply

I added "Leadwerks::" but it displayed more errors biggrin.png

 

lerror2.png

 

I created "Blank Project" from Project Manager of Leadwerks.

I heard that Steam version of Leadwerks does not support C++ but it was from 3.x version, and there is a DLC which help user use C++. Now Im not sure...

Just don't know what was wrong, please smile.png

Link to comment
Share on other sites

Are you using Leadwerks on Steam? This code works fine with the current build:

#include "App.h"

using namespace Leadwerks;

App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {}

App::~App() { delete world; delete window; }

Model* model = NULL;

bool App::Start()
{
    //Create a window
    window = Leadwerks::Window::Create();

    context = Context::Create(window);
    world = World::Create();
    camera = Camera::Create();
    camera->Move(0,0,-3);
    Light* light = DirectionalLight::Create();
    light->SetRotation(35,35,0);

    //Create a model
    model = Model::Box();
    model->SetColor(0.0,0.0,1.0);

    return true;
}

bool App::Loop()
{
    if (window->Closed() || window->KeyDown(Key::Escape)) return false;

    model->Turn(0,Leadwerks::Time::GetSpeed(),0);

    Leadwerks::Time::Update();
    world->Update();
    world->Render();
    context->Sync(false);

    return true;
}

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The generated project will link to whatever location the Steam files are installed in. It should just work automatically. But yeah, it sounds like it can't find the SO file.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...