1

Currently I'm facing a problem, compiling Doxygen on MSYS2 using either MinGW32 or Mingw-w64 on Windows 10.

I did:

  1. git clone https://github.com/doxygen/doxygen.git
  2. cd doxygen && mkdir build && cd build
  3. cmake -G "Unix Makefiles" ..
  4. make

When using MinGW32 I get the following errors:

In file included from C:/msys64/home/dglaser/GIT/doxygen/src/layout.cpp:36:0:
C:/msys64/home/dglaser/GIT/doxygen/build/generated_src/layout_default.xml.h:1:1: warning: missing terminating " character
  \n"doxygenlayout version=\"1.0\">
  ^
[...]

When using Mingw-w64 (after deleting build and do above steps again), everything compiles fine and I get errors during linkage:

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../lib/libdoxymain.a(doxygen.cpp.obj):doxygen.cpp:(.text+0x36dd6): undefined reference to `QFileInfo::absFilePath() const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../lib/libdoxymain.a(doxygen.cpp.obj):doxygen.cpp:(.text+0x36e84): undefined reference to `QFileInfo::isFile() const'
[...]

How can one of those be solved?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
themole
  • 363
  • 3
  • 12
  • Reinstalling msys2 did the job. After installing all dependent libraries, doxygen is now compiling nicely. If Iconv is not recognized after installation, delete the build folder and rerun cmake again. It worked with `cmake -G "Unix Makefiles" ..` – themole May 29 '20 at 13:30

2 Answers2

1

When using MSYS2 you should use:

cmake.exe -G"MSYS Makefiles"

When I build from the latest source tarball http://doxygen.nl/files/doxygen-1.8.18.src.tar.gz it works after I removed the line containing /bigobj from CMakeLists.txt.

Brecht Sanders
  • 6,215
  • 1
  • 16
  • 40
  • Unfortunately, my cmake doesn't know about MSYS Makefiles: – themole May 29 '20 at 12:49
  • Thanks, but reinstalling msys2 did the trick."MSYS Makefiles" is still not available. – themole May 29 '20 at 13:30
  • @themole my windows 10 CMake does have the possibiliy for MSYS Makefiles, which version of cmake are you using? Is this the windows version (where cmake)? – albert May 29 '20 at 14:20
  • I was using the CMake version that I compiled myself. These days I also use -GNinja in MSYS2 as ninja is a lot faster than make. – Brecht Sanders May 29 '20 at 14:46
0

MSYS2 was somehow broken or outdated. Updating crashed the environment, so I deleted folder C:\msys64 and reinstalled it.

After installing all dependencies correctly (GCC, CMake, Make, Python, libiconv, Bison, and bisonc++), it compiled and executed correctly.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
themole
  • 363
  • 3
  • 12