Compilation Qt 4.7.3 under Windows x64 with VS 2008 - visual-c++

I tried to compilation Qt 4.7.3 under Windows x64 with VS 2008.
Step by step:
Start Start Menu\Microsoft Visual Studio 2008\Visual Studio Remote Tools\Visual Studio 2008 x64 Win64 Command Prompt
Go to C:\Qt\4.7.3\
Type configure
Type nmake.
But I have compilation error:
qnetworkdiskcache.cpp
c:\qt\4.7.3\include\qtcore\private\../../../src/corelib/io/qiodevice_p.h(170) :
warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss
of data
c:\qt\4.7.3\include\qtcore\private\../../../src/corelib/io/qiodevice_p.h(170) :
warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss
of data
c:\qt\4.7.3\include\qtcore\private\../../../src/corelib/io/qiodevice_p.h(170) :
warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss
of data
access\qnetworkrequest.cpp(997) : warning C4996: 'sscanf': This function or vari
able may be unsafe. Consider using sscanf_s instead. To disable deprecation, use
_CRT_SECURE_NO_WARNINGS. See online help for details.
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(32
4) : see declaration of 'sscanf'
c:\Qt\4.7.3\src\network\tmp\moc\debug_shared\moc_qnetworkreplyimpl_p.cpp(99) : e
rror C2079: '_r' uses undefined class 'QSslConfiguration'
c:\Qt\4.7.3\src\network\tmp\moc\debug_shared\moc_qnetworkreplyimpl_p.cpp(99) : e
rror C3861: 'sslConfigurationImplementation': identifier not found
c:\Qt\4.7.3\src\network\tmp\moc\debug_shared\moc_qnetworkreplyimpl_p.cpp(100) :
error C2582: 'operator =' function is unavailable in 'QSslConfiguration'
c:\Qt\4.7.3\src\network\tmp\moc\debug_shared\moc_qnetworkreplyimpl_p.cpp(101) :
error C3861: 'setSslConfigurationImplementation': identifier not found
c:\Qt\4.7.3\src\network\tmp\moc\debug_shared\moc_qnetworkreplyimpl_p.cpp(102) :
error C3861: 'ignoreSslErrorsImplementation': identifier not found
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
I used nmake /I for compilation Qt. I compiled modules, what was needed me successful.

Not all modules of Qt are easily build-able in VS. The following configure parameters have worked for people in the past:
configure.exe -platform win32-msvc2008 -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support -fast

Related

I have no erors in my scripts I but receive many errors in the xlocnum, io, and the xiosbase files, I tried looking at the errors but dont understand

The errors might be showing because of the internal thing I had created and defined as static
here is the build ouput
1>------ Build started: Project: C++_Game_Stuff, Configuration: Debug Win32 ------
1>win64_maybe32_idk_platform.cpp
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xiosbase(41,1): error C2159:
more than one storage class specified
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xiosbase(93): message : see
reference to class template instantiation 'std::_Iosb<_Dummy>' being compiled
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xiosbase(41,43): error C2059:
syntax error: '='
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xiosbase(41,1): error C2238:
unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xiosbase(112,56): error C2589:
'static': illegal token on right side of '::'
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xiosbase(112,1): error C2062:
type 'unknown-type' unexpected
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xlocnum(1439,73): error C2589:
'static': illegal token on right side of '::'
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xlocnum(1555): message : see
reference to class template instantiation 'std::num_put<_Elem,_OutIt>' being compiled
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xlocnum(1522,73): error C2589:
'static': illegal token on right side of '::'
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ios(216,45): error C2059: syntax
error: 'type'
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ios(216,66): error C2143: syntax
error: missing ';' before '{'
1>C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ios(216,66): error C2447: '{':
missing function header (old-style formal list?)
1>C:\Users\maazs\source\repos\C++_Game_Stuff\C++_Game_Stuff\win64_maybe32_idk_platform.cpp(71,5): warning C4007: 'WinMain': must be '__stdcall'
1>Done building project "C++_Game_Stuff.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The rest of the code is just warnings about int to float conversions:
I am not to skilled in programming and I am also following a tutorial however though I believe I had defined a macro variable for the static keyword called #define internal static however this had caused errors due to the files I was talking about(Xiobase, xlocnum, io) containing a keyword named internal thus causing errors because of the two variables with different meaning having the same name the program was confused.

Compiler errors in standard C library headers in VS2015 - Visual C++ Console Application project

I recently created a VS2015 solution to continue development on a C++ project I had been working on. Whenever I try to build the project, I get hundreds of errors from standard C library header files such as string.h, stdio.h, etc.
To try to get to the root of the problem, I created a new, very basic, VC++ win32 console application project, wondering if I'd see the same compiler errors. Here is the code (ConsoleApplication1.cpp):
#include <string>
#include <iostream>
int main()
{
std::string s = "some data to print...";
std::cout << "Printing: " << s.c_str() << std::endl;
return 0;
}
When I attempt to compile this, I get 150+ errors, like this:
1>------ Build started: Project: ConsoleApplication1, Configuration: Release Win32 ------
1> stdafx.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(311): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(311): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(311): error C2086: 'int _CRTIMP_ALTERNATIVE': redefinition
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): note: see declaration of '_CRTIMP_ALTERNATIVE'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(317): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(317): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(317): error C2086: 'int _CRTIMP_ALTERNATIVE': redefinition
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): note: see declaration of '_CRTIMP_ALTERNATIVE'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(320): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(320): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(320): error C2086: 'int _CRTIMP_ALTERNATIVE': redefinition
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): note: see declaration of '_CRTIMP_ALTERNATIVE'
....etc
I have tried to 'repair' Microsoft VC++ 2015 Redistributable(x86) via the Windows 'Uninstall or change a program' utility, to no avail. I also tried to repair Visual Studio 2015 as a whole.
I'm on Windows 7.
Anyone have an idea what is going on here? Am I pointed to the wrong include directory or something?
It appears you have (some of) the headers from a previous version of VS installed in your VS2015 folder. The standard headers in VS2015 are stored off in a folder tied to the version of the CRT (something like c:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt). Repairing or reinstalling VS2015 won't fix this.
I think you'll need to uninstall VS2015, completely delete the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0, then reinstall it. This will likely break the other version (VS2013?) that is installed there, so you might want/need to uninstall that version instead, then repair VS2015.
The header that comes with VS2015 does not appear to have the "int _CRTIMP_ALTERNATIVE" listed in some of the error messages at those lines, while the one with VS2013 does.

VC++ CefSharp Import Win32 -> x64 error

In VS2013 Community Edition, I had a Win32 VC++ clr project I've been working on. I'm trying to use the CefSharp library, and so through nuget I've imported it.
Following the steps found here I learned I had to change from Win32 to x64 as my 'Active solution platform' to avoid this:
error : CefSharp.Common does not work correctly on 'Win32' platform. You need to specify platform (x86 / x64).
However when I follow those steps and add x64 to my project through the configuration manager, I get the following compilation errors:
1>------ Build started: Project: PROJECTNAME, Configuration: Release x64 ------
1> Main.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(20): error C2869: 'std::errc' : has already been defined to be a namespace
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(101): error C2146: syntax error : missing ';' before identifier 'generic_errno'
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(101): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(101): fatal error C1903: unable to recover from previous error(s); stopping compilation
I'm not sure what is causing this or how to solve it.

LNK2019 unresolved symbol compiling LuaJava with Visual Studio 2012

I am working with visual studio 2012 to compile LuaJava. The problem I am having is when I call the linker. The line that calls the linker in the makefile is:
link /dll /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64"
/LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\amd64"
/out:luajava-1.1.dll src\c\luajava.obj
"C:\Program Files (x86)\Lua\5.1\lib\lua5.1.lib" /VERBOSE
This seems to almost be linking everything successfully, until it gets to the Lua library.
The linker outputs the following when I try to make the project:
...//linking of other libraries
Finished searching libraries
Unused libraries:
C:\Program Files (x86)\Lua\5.1\lib\lua5.1.lib
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\amd64\OLDNAMES.lib
luajava.obj : error LNK2019: unresolved external symbol lua_close referenced in function Java_org_keplerproject_luajava_LuaState__1close
luajava.obj : error LNK2019: unresolved external symbol lua_newthread referenced in function Java_org_keplerproject_luajava_LuaState__1newthread
luajava.obj : error LNK2019: unresolved external symbol lua_gettop referenced in function Java_org_keplerproject_luajava_LuaState__1getTop
...//lots of these errors
luajava-1.1.dll : fatal error LNK1120: 88 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\x86_amd64\link.EXE"' : return code '0x460'
Stop.
I'm confused as to why it says that the Lua library is unused, and then complains when it can't find the Lua library functions.
You can not link a 32 bit library to your 64 bit application. After some searces I do not believe LuaJava has a x64 download so to use this you must change your application to 32 bit.
Edit:
A second method would be to recomile LuaJava as a 64 bit dll. Here is a very recent post about that: LuaJava compile error "Unresolved external symbol"

atlcom.h build error when built for platform set to x64

I am converting a existing c++ project to 64-bit version from 32-bit version. This project builds fine in 32-bit version, after converting to build for x64 platform in Configuration Manager i am getting bellow build error, are there any specific i have to inherit for 64-bit version or am i missing anything.
error C2259: 'ATL::CComObject' : cannot instantiate abstract class
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h
Below is the error from the output while building the project.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2000): error C2259: 'ATL::CComObject<Base>' : cannot instantiate abstract class
with
[
Base=NAlertBand
]
due to following members:
'HRESULT IContextMenu::GetCommandString(UINT_PTR,UINT,UINT *,CHAR *,UINT)' : is abstract
C:\Program Files (x86)\Windows Kits\8.0\Include\um\shobjidl.h(2732) : see declaration of 'IContextMenu::GetCommandString'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(1989) : while compiling class template member function 'HRESULT ATL::CComCreator<T1>::CreateInstance(void *,const IID &,LPVOID *)'
with
[
T1=ATL::CComObject<NAlertBand>
]
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2096) : see reference to function template instantiation 'HRESULT ATL::CComCreator<T1>::CreateInstance(void *,const IID &,LPVOID *)' being compiled
with
[
T1=ATL::CComObject<NAlertBand>
]
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2095) : see reference to class template instantiation 'ATL::CComCreator<T1>' being compiled
with
[
T1=ATL::CComObject<NAlertBand>
]
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2091) : while compiling class template member function 'HRESULT ATL::CComCreator2<T1,T2>::CreateInstance(void *,const IID &,LPVOID *)'
with
[
T1=ATL::CComCreator<ATL::CComObject<NAlertBand>>,
T2=ATL::CComFailCreator<-2147221232>
]
NAlerts.cxx(44) : see reference to function template instantiation 'HRESULT ATL::CComCreator2<T1,T2>::CreateInstance(void *,const IID &,LPVOID *)' being compiled
with
[
T1=ATL::CComCreator<ATL::CComObject<NAlertBand>>,
T2=ATL::CComFailCreator<-2147221232>
]
NAlerts.cxx(44) : see reference to class template instantiation 'ATL::CComCreator2<T1,T2>' being compiled
with
[
T1=ATL::CComCreator<ATL::CComObject<NAlertBand>>,
T2=ATL::CComFailCreator<-2147221232>
]
QMessage.cxx
Thanks
Here is a similar thread - http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/d6144eaa-fa37-4133-87a0-75a06633209b
Please post the rest of the errors also.

Resources