|
|
Home » Developing U++ » U++ Developers corner » Is U++ compatible with VC++ Express 2012?
|
|
|
|
|
|
|
|
|
Re: Is U++ compatible with VC++ Express 2012? [message #40065 is a reply to message #40064] |
Sun, 02 June 2013 12:48   |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
Hello, Neil.
nlneilson wrote on Sun, 02 June 2013 02:40 | With 6128 I get several pages of:
fatal error C1083: Cannot open include file: 'windef.h': No such file or directory
|
As I already said in Redmine, I created the patch for initial support only. The include and library directories might be different.
For further support I need to check include and library directories/files from computers with installed Visual Studio 2012. For this purpose I created following console application (which is excerpt from actual auto-setup):
Toggle source code
#include <Core/Core.h>
using namespace Upp;
String NormalizePathNN(const String& path)
{
return IsNull(path) ? path : NormalizePath(path);
}
bool ExistProgram(String& bin, const char *dir, const char *file)
{
String win = NormalizePath(GetWindowsDirectory());
if (FileExists(AppendFileName(win.Mid(0, 3) + dir, file))) {
bin = win.Mid(0, 3) + dir;
return true;
}
return false;
}
bool OrderOfFiles(const String& a, const String& b)
{
return stricmp(a, b) < 0;
}
void PrintDir(const String& dir, Vector<String>& list)
{
FindFile ff(AppendFileName(dir, "*.*"));
int from = dir.EndsWith(AsString(DIR_SEP)) ? dir.GetCount() : dir.GetCount() + 1;
Vector<String> dirs, files;
while (ff) {
String p = AppendFileName(dir, ff.GetName());
if (ff.IsFile())
files.Add(p.Mid(from));
if (ff.IsFolder())
dirs.Add(p);
ff.Next();
}
Sort(dirs, &OrderOfFiles);
Sort(files, &OrderOfFiles);
if (!files.IsEmpty()) {
list.Add(dir);
RLOG("--> " << dir);
for (int i = 0, n = files.GetCount(); i < n; ++i)
RLOG(files[i]);
}
for (int i = 0, n = dirs.GetCount(); i < n; ++i)
PrintDir(dirs[i], list);
}
CONSOLE_APP_MAIN
{
String sdk = NormalizePathNN(GetWinRegString("InstallationFolder",
"SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0",
HKEY_LOCAL_MACHINE));
String bin;
if (!IsNull(sdk) && FileExists(AppendFileName(sdk, "VC\\Bin\\cl.exe"))) {
bin = sdk;
}
else
ExistProgram(bin, "Program Files (x86)\\Microsoft Visual Studio 11.0", "VC\\Bin\\cl.exe")
|| ExistProgram(bin, "Program Files\\Microsoft Visual Studio 11.0", "VC\\Bin\\cl.exe");
RDUMP(sdk);
RDUMP(bin);
if (!IsNull(bin))
RLOG("MSC11 supported");
String vc_64 = AppendFileName(bin, "VC\\Bin\\x64");
if (!FileExists(AppendFileName(vc_64, "cl.exe")))
vc_64 = AppendFileName(bin, "VC\\Bin\\x86_amd64");
if (bin.GetLength() && FileExists(AppendFileName(vc_64, "cl.exe")))
RLOG("MSC11x64 supported");
if (IsNull(sdk) || IsNull(bin))
return;
String incbin = AppendFileName(bin, "VC\\Include"),
incsdk = AppendFileName(sdk, "Include"),
libbin = AppendFileName(bin, "VC\\Lib"),
libsdk = AppendFileName(sdk, "Lib");
RLOG("Include files:");
Vector<String> includes;
PrintDir(incbin, includes);
PrintDir(incsdk, includes);
RDUMPC(includes);
RLOG("Library files:");
Vector<String> libs;
PrintDir(libbin, libs);
PrintDir(libsdk, libs);
RDUMPC(libs);
}
This application creates log file, which you could compress and send me through private message or post it here. Then I could compare it with Visual Studio 2012 topic output and create additional patch.
[Updated on: Mon, 03 June 2013 13:46] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Is U++ compatible with VC++ Express 2012? [message #40217 is a reply to message #40212] |
Fri, 05 July 2013 08:46   |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
nlneilson wrote on Wed, 03 July 2013 15:15 | As a side note the M$VS 2013 Preview is now available.
|
Ok, I created redmine issue and necessary patch for this feature.
I used following console application to get path, include and library directories:
Toggle source code
#include <Core/Core.h>
using namespace Upp;
String NormalizePathNN(const String& path)
{
return IsNull(path) ? path : NormalizePath(path);
}
bool ExistProgram(String& bin, const char *dir, const char *file)
{
String win = NormalizePath(GetWindowsDirectory());
if (FileExists(AppendFileName(win.Mid(0, 3) + dir, file))) {
bin = win.Mid(0, 3) + dir;
return true;
}
return false;
}
bool OrderOfFiles(const String& a, const String& b)
{
return stricmp(a, b) < 0;
}
void PrintDir(const String& dir, Vector<String>& list)
{
FindFile ff(AppendFileName(dir, "*.*"));
int from = dir.EndsWith(AsString(DIR_SEP)) ? dir.GetCount() : dir.GetCount() + 1;
Vector<String> dirs, files;
while (ff) {
String p = AppendFileName(dir, ff.GetName());
if (ff.IsFile())
files.Add(p.Mid(from));
if (ff.IsFolder())
dirs.Add(p);
ff.Next();
}
Sort(dirs, &OrderOfFiles);
Sort(files, &OrderOfFiles);
if (!files.IsEmpty()) {
list.Add(dir);
RLOG("--> " << dir);
for (int i = 0, n = files.GetCount(); i < n; ++i)
RLOG(files[i]);
}
for (int i = 0, n = dirs.GetCount(); i < n; ++i)
PrintDir(dirs[i], list);
}
CONSOLE_APP_MAIN
{
String sdk = NormalizePathNN(GetWinRegString("InstallationFolder",
"SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1",
HKEY_LOCAL_MACHINE));
String bin;
if (!IsNull(sdk) && FileExists(AppendFileName(sdk, "VC\\bin\\cl.exe"))) {
bin = sdk;
}
else
ExistProgram(bin, "Program Files (x86)\\Microsoft Visual Studio 12.0", "VC\\bin\\cl.exe")
|| ExistProgram(bin, "Program Files\\Microsoft Visual Studio 12.0", "VC\\bin\\cl.exe");
RDUMP(bin);
RDUMP(sdk);
if (!IsNull(bin))
RLOG("MSC12 supported");
String vc_64 = AppendFileName(bin, "VC\\bin\\x64");
if (!FileExists(AppendFileName(vc_64, "cl.exe")))
vc_64 = AppendFileName(bin, "VC\\bin\\x86_amd64");
if (bin.GetLength() && FileExists(AppendFileName(vc_64, "cl.exe")))
RLOG("MSC12x64 supported");
if (IsNull(sdk) || IsNull(bin))
return;
String pathbin = AppendFileName(bin, "VC\\bin"),
pathsdk = AppendFileName(sdk, "bin"),
incbin = AppendFileName(bin, "VC\\include"),
incsdk = AppendFileName(sdk, "Include"),
libbin = AppendFileName(bin, "VC\\lib"),
libsdk = AppendFileName(sdk, "Lib");
RLOG("Path files:");
{
Vector<String> bins;
PrintDir(pathbin, bins);
PrintDir(pathsdk, bins);
RDUMPC(bins);
}
RLOG("Include files:");
{
Vector<String> includes;
PrintDir(incbin, includes);
PrintDir(incsdk, includes);
RDUMPC(includes);
}
RLOG("Library files:");
Vector<String> libs;
PrintDir(libbin, libs);
PrintDir(libsdk, libs);
RDUMPC(libs);
}
In the attachments you could find log file output and MSC12 builder files (for patched TheIDE).
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 15:08:06 CEST 2025
Total time taken to generate the page: 0.01175 seconds
|
|
|