我正在编写一个使用 XGetPixel() 方法的程序。但是,在使用它时,我收到一条错误消息“错误:XGetPixel 未在此范围内声明”
我的代码如下:
#include <X11/Xlib.h>
#include <X11/X.h>
#include <unistd.h>
#include <iostream>
using namespace std;
int main()
{
// Open a display.
Display *d = XOpenDisplay(NULL);
// Get the root of the display
Window root = DefaultRootWindow(d);
// Map the root window
XMapWindow(d, root);
// Get width and height of the display
int windowHeight = XDisplayHeight (d, 0);
int windowWidth = XDisplayWidth(d, 0);
// Get dump of screen
XImage *image = XGetImage(d, root, 0, 0, windowWidth, windowHeight, AllPlanes, ZPixmap); …Run Code Online (Sandbox Code Playgroud) I'm trying to build and run a flutter app on my iPhone or iOS simulator. When I do a build, the build succeeds but it's giving me:\nUnable to install \xe2\x80\x9cRunner\xe2\x80\x9d. \xe2\x80\x9cRunner\xe2\x80\x9d does not contain a valid Info.plist, so it cannot be installed and (\xe2\x80\x9cCFBundleExecutable\xe2\x80\x9d is not specified)
I'm not able to install the app on the simulator or my actual iPhone, both give the same error.
\nI'm on a Mac Mini M1, running macOS Monterey Version 12.1 …