Building FAR Manager

You have encountered a problem using Far Manager? Here you can get help.
User avatar
michaelang
Posts: 17
Joined: Sat 17 Jan, 2009 08:48

Compiling Far2.0 problem

Post by michaelang »

Hi,
I could not compile Far (svn) of late, there are a lot of "conflicts with previous declaration" errors.
Notice there is a new SDK folder with sdk.common.h, sdk.gcc.h, sdk.vc.h. which is used in headers.hpp.
This cause conflicts with my C:\MinGW\include\ddk\*.h

I use /cygdrive/c/mingw/bin/mingw32-make -f makefile_gcc to build
How to over come this?

Thanks.
Michael
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Building FAR Manager

Post by pepak »

Hi! I need to rebuild FAR Manager to add some logging, in order to discover just why FAR3 hangs so often on me. Unfortunately, I can't get FAR Manager to build. What I did:
  1. Get FAR source code: svn co http://farmanager.googlecode.com/svn/trunk/unicode_far unicode_far
  2. Download mingw-get from http://mingw.org/wiki/Getting_Started
  3. Extract mingw-get to a directory and run mingw-get install gcc g++ mingw32-make mingw32-utils msys-core msys-m4 msys-bison msys-coreutils msys-diffutils msys-make
  4. Go to msys\1.0\postinstall and run pi.bat
  5. Download re2c-0.13.5-bin.zip from http://sourceforge.net/projects/re2c and extract it to bin
  6. Go to unicode_far and run build gcc 32
The build stops at file cddrv.cpp with an error that STORAGE_DESCRIPTOR_HEADER is not available in this scope:


If I add #include <ddk/ntddcdvd.h> as the last include in cddrv.c and run build again, I get:


What did I do wrong? Or is mingw no longer supported as the compiler? As far as I can tell, all the tools should be up to date, __W32API_VERSION is 3.17 and a very similar sequence (different in that I had to download MINGW tools by hand, not with mingw-get) used to work for me. The hacking-en file tells me to use mingw32-make -f makefile_gcc, but that gives me exactly the same results as the build.bat file.

Can anyone help, please? Thanks.
Shmuel
Posts: 6819
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 528 times

Re: Building FAR Manager

Post by Shmuel »

I'd recommend you to do either:

1. Install latest MinGW from mingw-builds (google it)
2. Run make -fmakefile_gcc from unicode_far directory

or:
1. Install MS Visual C++ Express
2. Run nmake /fmakefile_vc from VC++ command prompt OR load far.vc[10|11|12].sln into IDE and build it.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: Building FAR Manager

Post by pepak »

Seems to work fine! Thanks! I will need to do a compare of the two MinGW installations to see what's different.
fire.sam
Posts: 4
Joined: Thu 13 Nov, 2014 18:07

g++.exe stopped working

Post by fire.sam »

When i try to compile any code There only shows this message "g++.exe stopped working".Why its showing how to fix it.Need help Asap
2useven10
Posts: 5204
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times

g++.exe stopped working

Post by 2useven10 »

Что за г++ (чей дистрибутив, версия....) ?
Last edited by 2useven10 on Fri 14 Nov, 2014 10:39, edited 1 time in total.
fire.sam
Posts: 4
Joined: Thu 13 Nov, 2014 18:07

g++.exe stopped working

Post by fire.sam »

whenever i try to compile any c++ code in far manager it shows g++.exe stopped working.How to fix the problem
2useven10
Posts: 5204
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times

g++.exe stopped working

Post by 2useven10 »

what gcc version do you use?
if compile host is windows try to use: http://sourceforge.net/projects/mingwbu ... ses/4.8.1/
Last edited by 2useven10 on Fri 14 Nov, 2014 10:42, edited 2 times in total.
fire.sam
Posts: 4
Joined: Thu 13 Nov, 2014 18:07

g++.exe stopped working

Post by fire.sam »

I am using MinGW But still its not compiling.When i tried to compile the cpp file it shows a message can't execute.Why????
2useven10
Posts: 5204
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times

g++.exe stopped working

Post by 2useven10 »

Again...
What version do you use? (just show `gcc -v` output).
Did you try gcc from the above link?
ChemicalDruid
Posts: 6
Joined: Fri 03 Feb, 2017 01:21

FAR built in MinGW64 but...

Post by ChemicalDruid »

FAR built in MinGW64 but... There were a couple of issues with #include's:

- In headers.hpp, I had to manually #include <devpropdef.h> before <setupapi.h> otherwise I was getting errors about DEVPROPKEY and DEVPROPTYPE.
- In interf.cpp and keyboard.cpp, IsWindows10OrGreater() wasn't recognized as defined via "headers.hpp" -> "sdk.hpp" -> "sdk/sdk_common.h", so I had to manually replace it with its return value and a hard-wired 0xA00 parameter for IsWindowsVersionOrGreater().

The 64bit build executable ran and functioned properly, but I am left unable to explain the above... any ideas?

Thanks in advance!
Last edited by HaRT on Fri 03 Feb, 2017 02:00, edited 1 time in total.
Reason: Merged with the Topic
2useven10
Posts: 5204
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times

Building FAR Manager

Post by 2useven10 »

ChemicalDruid, MinGW64 6.3.0 -- just compiled without any problem.
ChemicalDruid
Posts: 6
Joined: Fri 03 Feb, 2017 01:21

Building FAR Manager

Post by ChemicalDruid »

Using latest MinGW64 under latest MSYS2 on Windows 10 64bit:

Code: Select all

$ gcc --version
gcc.exe (Rev1, Built by MSYS2 project) 6.3.0
Maybe there was an issue with #include depth?... Just checking in case anyone else has encountered this.
ChemicalDruid
Posts: 6
Joined: Fri 03 Feb, 2017 01:21

Building FAR Manager

Post by ChemicalDruid »

Hmmm... _WIN32_WINNT seems to be 0x0502 on my Windows 10.0.14393, is that what it should be? I thought it would be 0x0A00...
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Building FAR Manager

Post by DrKnS »

We cannot test and support every mingw distribution in the universe - take the one from the 2useven10's link above, it "just works".
Post Reply

Return to “Support and Troubleshooting”