Building FAR Manager

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

Compiling Far2.0 problem

Post by michaelang » Sun 20 Sep, 2009 06:05

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: 325
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Building FAR Manager

Post by pepak » Fri 28 Mar, 2014 17:22

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: 5104
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 11 times
Been thanked: 141 times

Re: Building FAR Manager

Post by Shmuel » Fri 28 Mar, 2014 18:43

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: 325
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Re: Building FAR Manager

Post by pepak » Fri 28 Mar, 2014 19:28

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 » Fri 14 Nov, 2014 07:43

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: 2978
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 80 times

g++.exe stopped working

Post by 2useven10 » Fri 14 Nov, 2014 08:05

Что за г++ (чей дистрибутив, версия....) ?
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 » Fri 14 Nov, 2014 08:06

whenever i try to compile any c++ code in far manager it shows g++.exe stopped working.How to fix the problem

2useven10
Posts: 2978
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 80 times

g++.exe stopped working

Post by 2useven10 » Fri 14 Nov, 2014 08:09

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 » Mon 24 Nov, 2014 06:23

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: 2978
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 80 times

g++.exe stopped working

Post by 2useven10 » Mon 24 Nov, 2014 09:51

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 » Fri 03 Feb, 2017 01:35

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: 2978
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 80 times

Building FAR Manager

Post by 2useven10 » Fri 03 Feb, 2017 08:20

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 » Fri 03 Feb, 2017 13:51

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 » Fri 03 Feb, 2017 21:29

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: 4563
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 2 times
Been thanked: 113 times
Contact:

Building FAR Manager

Post by DrKnS » Fri 03 Feb, 2017 22:37

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

2useven10
Posts: 2978
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 80 times

Building FAR Manager

Post by 2useven10 » Fri 03 Feb, 2017 22:48

ChemicalDruid wrote: Hmmm... _WIN32_WINNT seems to be 0x0502 on my Windows 10.0.14393
It is not about the system it is about SDK version.
0x0502 version used in sdkddkver.h if neither WINVER nor _WIN32_WINNT was defined.
It looks like __GNUC__ is not defined in gcc you used, otherwise it should be defined in headers.hpp

Code: Select all

# undef WINVER
# undef _WIN32_WINNT
# undef _WIN32_IE
# define WINVER       0x0603
# define _WIN32_WINNT 0x0603
Last edited by 2useven10 on Fri 03 Feb, 2017 22:53, edited 3 times in total.

Post Reply

Return to “Support and Troubleshooting”