Board index FlightGear Support Compiling

Error using NetBeans and Windows

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

Error using NetBeans and Windows

Postby macnab » Sun Dec 16, 2012 12:40 pm

I get this error when building simgear.
Code: Select all
-- The C compiler identification is GNU 4.6.2
-- The CXX compiler identification is GNU 4.6.2
-- Check for working C compiler: C:\MinGW\bin\gcc.exe
-- Check for working C compiler: C:\MinGW\bin\gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Configuring incomplete, errors occurred!
CMake Error at build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake:1 (set):
  Syntax error in cmake code at

    G:/home/fgfs/simgear/build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake:1

  when parsing string

    C:\MinGW\bin\gcc.exe

  Invalid escape sequence \M
Call Stack (most recent call first):
  C:/PROGS/Programming/CMake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:83 (include)
  CMakeLists.txt:7 (project)


You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= C:\\MinGW\\bin\\gcc.exe
CMAKE_CXX_COMPILER= C:\\MinGW\\bin\\g++.exe

CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CXX_FLAGS_DEBUG
-- Generating done
    CMAKE_C_FLAGS_DEBUG
-- Build files have been written to: G:/home/fgfs/simgear/build


This is the offending line 83 from C:/PROGS/Programming/CMake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:83 (include)
Code: Select all
  include(${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake)
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Error using NetBeans and Windows

Postby Hooray » Sun Dec 16, 2012 6:34 pm

The error message seems pretty clear about it actually, look at your use of backslashes (\) instead of forward slashes (/) without properly escaping the backslashes, as shown in the error message. In case of doubt, use quoted forward slashes for all paths (to also handle whitespaces and non-standard characters that may have a special meaning in a shell environment).
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Error using NetBeans and Windows

Postby macnab » Mon Dec 17, 2012 3:32 pm

I see it as well, now. In Tools, Options, C/C++ all the backslashes set by NetBeans must be changed to forward slashes.

Now get further, it gets stuck at finding Boost and OpenAL. I have the 3rdParty bundle downloaded, and include all those folders, and the header files are there, but NetBeans says it can't find them for Boost.

As for OpenAL, all that is there is OpenAL.dll, and connect.creativelabs.com still gives an error.
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Error using NetBeans and Windows

Postby Hooray » Mon Dec 17, 2012 5:49 pm

I'll have to let zakalawe comment on that, because I haven't used that 3rd party zip file myself. So not sure how this needs to be applied / set up.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Error using NetBeans and Windows

Postby macnab » Tue Dec 18, 2012 3:43 am

Exact error
Code: Select all
CMake Error at C:/PROGS/Programming/CMake/share/cmake-2.8/Modules/FindBoost.cmake:1192 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:168 (find_package)

I include the boost_1_44_0 folder (with sub-folders boost and lib).
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Error using NetBeans and Windows

Postby Hooray » Tue Dec 18, 2012 11:03 am

Have you tried following the instructions in the error message regarding the required variables, namely:

  • Please set BOOST_ROOT to the root
    directory containing Boost
  • or BOOST_INCLUDEDIR to the directory containing
    Boost's headers.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Error using NetBeans and Windows

Postby macnab » Tue Dec 18, 2012 11:22 am

I'm not given the opportunity. I'm loading simgear as a project. It gets configured through CMakeLists.txt. That is where it fails.

I tried playing with CMakeGui. It fails, I point it to the boost folder and it still fails.
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Error using NetBeans and Windows

Postby Hooray » Tue Dec 18, 2012 11:42 am

both, cmakeGUI & NetBeans, should provide an option to configure environment variables for each build stage.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Error using NetBeans and Windows

Postby macnab » Tue Dec 18, 2012 12:16 pm

I was thinking to create the simgear project, let it fail due to not finding boost or opanAL and then seeing if there is anywhere I can configure it.

Hoever, since playing with CMakeGui I get a total failure trying to create simgear as a project:

Code: Select all
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:G:/home/fgfs/simgear/build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:G:/home/fgfs/simgear/build/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Error using NetBeans and Windows

Postby Hooray » Mon Jan 28, 2013 6:57 pm

what's the status here, have you succeeded or given up ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Error using NetBeans and Windows

Postby macnab » Tue Jan 29, 2013 2:54 am

Temporarily given up as I am unable to get past even the first step.
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Error using NetBeans and Windows

Postby Hooray » Wed Jan 30, 2013 6:50 am

Sorry, I cannot really help with Windows-specific issues at the moment. But what about the 3rd-party.zip file that James mentioned earlier, does it work or not ?

Otherwise, I'd be inclined to ask if it is an option for you to simply install a Linux distribution next to your existing OS, using a debian/ubuntu-based distro, you should be pretty much set within a few hours actually, and it's largely automated due to brisa's "download & compile" script.

Note that I'm not suggesting to totally switch to Linux, just trying to find a workaround that can be largely automated without too much manual intervention.

These days, Linux distros like Lubuntu have become really user friendly and there's little difference when using a good desktop environment like KDE for example. Obviously, you would require a fair amount of disk space; while Linux itself can be installed with less than 5gb of free space, building FG from source and installing everything else, will easily require another 10-20 gb.

But overall, you'll probably end up with a pretty solid development environment, that wouldn't be subject to viruses, worms and trojan horses :lol:
Honestly, I wouldn't suggest that if I hadn't the impression that you could deal with it (assuming that you have nil unix/linux experience).

Otherwise, I agree that it's actually a pretty pathetic suggestion - and that we really need to fix the windows build instructions, so that people can follow them and end up with a working build environment and an up to date binary. I'm just afraid that's going to be a little tricky due to the lack of windows users here who regularly build FG from source using "free" tools.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Error using NetBeans and Windows

Postby macnab » Wed Jan 30, 2013 7:32 am

But what about the 3rd-party.zip file that James mentioned

I've got those files. Problem is I don't even get that far. It has something to do with cmake and NetBeans. I have no experience with make files except for years ago when it was just a single file (and we didn't have a RAD environment which did it for you. What it really needs is someone with cmake experience who wants to use NetBeans, so at least they know how to fix the problem.

As for doing Linux compiles, I have so much on my plate at the moment that it will have to wait. The only C++ level change that I can think of making at the moment is to have an FGCOMMAND that dynamically switches joystick buttons to repeatable so that controls.nas can do the switch based on the function called to give users more flexibility with button assignment. But that will have to wait until the dust has settles after the new release.
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Error using NetBeans and Windows

Postby Hooray » Wed Jan 30, 2013 6:47 pm

What about the instructions at: http://geoffair.net/fg/
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Error using NetBeans and Windows

Postby macnab » Thu Jan 31, 2013 1:48 am

I'll go through it.
macnab
 
Posts: 885
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Next

Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest