You are currently browsing the Boolog blog archives for April, 2018


qmake fails after lrelease failed

Project ERROR: Failed to run: 'lrelease.exe'

In 64bit Windows environment, 64bit and 32bit application have some different properties like the environment variables. You should use 64bit Command Prompt or Explorer to build a project with qmake in 64bit Windows.

Visual Studio’s resource editor fails to open a Form because the class is not the first class in the header file (C++/CLI)

Suppose you have a following header file and tries to open it in the resource editor of Visual Studio.

namespace Ambiesoft {
	using namespace System;
 
	ref class EncComboItem;
	ref class CSearchURL;
 
	ref class AddHttpDicDialog : public System::Windows::Forms::Form
	{
		...
	}
}

You might have an error like this.

The forward references (ref class) causes this. To fix this, separate them into another files.

In headerref.h (newly created)

#pragma once
namespace Ambiesoft {
	ref class EncComboItem;
	ref class CSearchURL;
}

In the original header,

#include "headerref.h"
 
namespace Ambiesoft {
	using namespace System;
 
	ref class AddHttpDicDialog : public System::Windows::Forms::Form
	{
		...
	}
}