Board index FlightGear Support Compiling

FlightGear Build with Visual Studio 2012

Building FlightGear from source, and in the need for help?

FlightGear Build with Visual Studio 2012

Postby Nouvell_jiang » Thu Mar 17, 2016 4:56 am

Hi, all
I'm buiding the FlightGear 2016.1.1 edition source code with Cmake 3.4.1 and Visual studio 2012 on the windows7 platform, some strange error make me crazy!
I have successfully build the 3rdparty libs with the same tools,and install alll libs and include headers as README suggested, the OpensceneGraph and the SimGear packages are also built and installed.
when I use cmake to configure FlightGear project , the Generating prodedure reporting a lot of "WARNING: Target 'fgfs' requests linking to directory 'c:/FlightGear/3rdParty/plib/lib'. Targets may link only to libraries. Cmake is dropping the item.
when I use Visual studio 2012 to build the FlightGear solution, a large amount of error output, most of the error is C2784, the compiler could not deduce template argument.
I have search the Internet for help, but no problem solution.
Please give me some help !
Thanks, sincerely.
Nouvell_jiang
 
Posts: 3
Joined: Thu Mar 17, 2016 3:49 am

Re: FlightGear Build with Visual Studio 2012

Postby Alant » Thu Mar 17, 2016 10:52 am

If Cmake does not find them automatically, the plib libraries must all be specified individually e.g. C:/FlightGear/3rdParty.x64/lib/fnt.lib for the font library, C:/FlightGear/3rdParty.x64/lib/pui.lib for the pui library. The plib debug libraries are not needed.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: FlightGear Build with Visual Studio 2012

Postby Nouvell_jiang » Sat Mar 19, 2016 2:13 am

Thanks Alant !
I Have configured the variable "PLIB_LIBRATIES" as "NOT_FOUND" in the CMAKE GUI, no wrnings reported when generating.
But the build with visual studio 2012 is still failed.
I try to build only one project once ,and I built the "fgadmin" project in the solution, I think the issue is very strange because the "error 2784" occured in the file "c:\program files(x86)\Microsoft visual studio 2012\vc\include\xstddef". The error point to the code:

174 template<class _Ty>
175 struct less
: public binary_function<_Ty, _Ty,bool>
{ operator()(const _Ty& _Left, const _Ty& _Right) const
{ //apply operator< to oprands
180 return(_Left < _Right);
}
};
all error point to line 180 of the statement "return(_Left < _Right)" , one errors is:
C:\program files(x86)\Microsoft Visual Studio 11.0\VC\include\xstddef(180):error c2784: "bool std::operator<(const std::_Tree<_Traits>&, const std::Tree<_Traits>&)": could not deduce template arguments for "const std::_Tree<_Traits>&" from "const std::string" .
C:\program files(x86)\Microsoft Visual Studio 11.0\VC\include\xtree(2245): see declaration of “std::operator < "
......
So,Whats wrong in the source of the FlightGear?
hope for some helps.
Nouvell_jiang
 
Posts: 3
Joined: Thu Mar 17, 2016 3:49 am

Re: FlightGear Build with Visual Studio 2012

Postby Alant » Sat Mar 19, 2016 12:18 pm

What is the name of the flightgear project and the flightgear source file that is being compiled when you get this error?
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: FlightGear Build with Visual Studio 2012

Postby Nouvell_jiang » Sat Mar 19, 2016 3:53 pm

Alant wrote in Sat Mar 19, 2016 12:18 pm:What is the name of the flightgear project and the flightgear source file that is being compiled when you get this error?

HI Alan:
The name of the flightgear project is "FlightGear", and the source directory is c:\FlightGear\FlightGear-2016.1.1, the build directory is c:\FlightGear-build.
When configure with Cmake, I enable the fgadmin, so the fgadmin is the first project in the solution explorer, among three source files fgadmin_funcs.cxx main.cxx untarka.c , the fgadmin_funcs.cxx could not be compiled, the other two files can be complied successfully.
Nouvell_jiang
 
Posts: 3
Joined: Thu Mar 17, 2016 3:49 am

Re: FlightGear Build with Visual Studio 2012

Postby Alant » Sat Mar 19, 2016 4:46 pm

Are you following any particular set of instructions?
See this post for a description of the build process here viewtopic.php?f=45&t=28486#p272695
Instead of compiling fgadmin and all of the projects separately, It is simpler to select build-solution (or key F7) from the Visual Studio Build menu bar. This builds everything in a sensible order.
Select Release build in Visual Studio as the Debug build has (or used to have) problems.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11


Return to Compiling

Who is online

Users browsing this forum: No registered users and 3 guests