我尝试用mingw 32-make编译,但显示以下错误:
g++ fitscli.cpp vipsoperations.cpp fits.cpp ConsoleTable.cpp `pkg-config vips-cpp ` -lcfitsio -ltiff -o fitscli
In file included from fitscli.cpp:7:
C:/msys64/ucrt64/include/vips/vips8:35:10: fatal error: glib-object.h: No such file or directory
35 | #include <glib-object.h>
生成文件为:
all:
g++ fitscli.cpp vipsoperations.cpp fits.cpp ConsoleTable.cpp `pkg-config vips-cpp ` -lcfitsio -ltiff -o fitscli
而且文件太大,所以我将显示错误在哪里(第7行包括〈vips/vips 8〉:
#include <iostream>
#include <fstream>
#include <filesystem>
#include <stdint.h>
#include <math.h>
#include "include/cxxopts.hpp"
#include <vips/vips8>
#include "fitsio.h"
#include "include/vipsoperations.h"
#include "include/fits.h"
#include "include/ConsoleTable.h"
#define MAXPIXELS 1e8
using namespace std;
using namespace vips;
void saveheader(string header,string filename);
string histogram(VImage img,int bins);
void report_progress(int showprogress,string message)
非常感谢您的帮助。现在我正在使用Windows 11,使用Msys UCRT 64,上次我尝试使用pacman -S mingw-w 64-ucrt-x86_64-glib 2重新安装glib 2,但它不起作用。正在成功安装库(/ucrt64/include/glib-2.0/glib-object.h)
我多次尝试修复glib_object. h路径,希望命令mingw 32-make编译并生成.exe文件
1条答案
按热度按时间9jyewag01#
谢谢你@HolyBlackCat,你的帮助是正确的。
makefile必须使用以下标志完成:
(note x1月1x)
并且必须从Bash执行"mingw32-make