0
价值
1
回答
浏览
MinGW14.2 undefined reference to `__imp___iob_func'
win10,MinGW14.2编译。
最近升级了编译器,发现用新的编译器编译EasyX程序不通过
编译指令:
-O2
-std=c++11
-I"C:\mingw64\include"
-I"C:\mingw64\x86_64-w64-mingw32\include"
-I"C:\mingw64\lib\gcc\x86_64-w64-mingw32\14.2.0\include"
-I"C:\mingw64\lib\gcc\x86_64-w64-mingw32\14.2.0\include
0
价值
1
回答
浏览
电脑的VS中getch和kbhit程序无法读取键盘输入以至于游戏没法玩怎么解决
vs2022 C语言
#include <graphics.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#define num 8
#define houdu1 20
#define houdu2 40
int ballx, bally;
int ballvx, ballvy;
int r = 40;
int barleft = 200;
i
0
价值
1
回答
浏览
使用AlphaBlend函数绘制图片失败,怎么解决
#include <graphics.h>
#include <iostream>
inline bool putimage_ex(IMAGE* img, int camera_x, int camera_y, int x, int y, int w, int h)
{
BLENDFUNCTION blend_func = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
int img_x = x >= camera_x ? 0 : camera_x - x;
0
价值
1
回答
浏览
C++账单管理系统在文件二进制数据序列化读入和输出出现问题,求大佬解惑
这里有问题,std::cerr << "长度" << passwordLength << std::endl;//如果前文写入的长度是10,此处会输出2573 ,然后输出后文的“2222”,可能是项目其他地方出现问题,可能需要帮我调试一下项目代码,还没写完,不到200行代码,好调试
std::ostream& operator<<(std::ostream& os, const BillManageme
0
价值
2
回答
浏览
vs code使用msys2 编译失败
D:\msys64\ucrt64\bin\g++.exe -fdiagnostics-color=always -g E:\VSCode\easyXstar\main.cpp -o E:\VSCode\easyXstar\main.exe -I E:\VSCode\easyXstar\easyX\include -L E:\VSCode\easyXstar\easyX\lib -lgdi32 -luser32 -lcomdlg32 -lgdiplus -loleaut32 -lole32 -static-libgcc -static-libstdc++ -lstdc++ -leasyx&
0
价值
1
回答
浏览
settextcolor在类中不能用?
在类的实现cpp中set开头的函数比如setbkmode,setfillcolor,settextstyle,setlinestyle,setlinecolor都起作用,唯有settextcolor设置后不起作用,在主函数中没问题,只好用win32的SetTextColor(GetImageHDC(),m_textcolor)来实现。
UINT m_align=DT_CENTER|DT_VCENTER|DT_SINGLELINE;
RECT r={left,top,left+width,top+height};
se
0
价值
1
回答
浏览
0x500275BC (vcruntime140d.dll)处(位于 1.exe 中)引发的异常: 0xC0000005: 写入位置 0x00000000 时发生访问冲突
0x500275BC (vcruntime140d.dll)处(位于 1.exe 中)引发的异常: 0xC0000005: 写入位置 0x00000000 时发生访问冲突
IMAGE* imgZhiwu[ZHI_WU_COUNT][50];
//植物卡牌
for (int i = 0; i < ZHI_WU_COUNT; i++)
{
sprintf_s(name, sizeof(name), "res\\Cards\\%d.png", i + 1);
loadimage(&imgCards[i
0
价值
0
回答
浏览
easyx编译报错
在easyx.h中将void *__imp___iob_func=0注释掉报错EasyX.GraphWnd.cpp:(.text+0x198c): undefined reference to `__imp___iob_func'
#pragma once
//void *__imp___iob_func=0; //练习添加的
ifndef WINVER
#define WINVER 0x0400 // Specifies that the minimum r
0
价值
1
回答
浏览
请问下了easyx但visual studio里面仍然用不了graphics.h库是怎么回事
请问下了easyx但visual studio里面仍然用不了graphics.h库是怎么回事
0
价值
1
回答
浏览
求教,在visual studio上可能是应malloc缺陷导致的“访问冲突”问题
在windows,2022版visual studio上,使用 默认(ISO C++14 标准)、默认(ISO C++14 标准) 的C/C++语言。
大概率是以下代码的问题
// 定义函数指针类型
typedef void (*Func)(Unit*);
//定义画图函数指针数组;
extern Func _drawFunc[100] = { NULL };
Func drawFuncP;
drawFuncP = _drawFunc[unit->type.shape]; // 获取画图函数指
0
价值
1
回答
浏览
用CMAKE 加 VSCODE 构建编译报错。问题出在哪里,该怎么解决
[build] D:/Programs/Microsoft VS Code/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/vscode/lib/libeasyx.a(EasyX.GraphWnd.o):EasyX.GraphWnd.cpp:(.text+0x198c): undefined reference to `__imp___iob_func'
[build] collect2.exe: error: ld returned 1 exi
0
价值
1
回答
浏览
为什么无法使用loadimage函数
include<easyx.h>
#include<graphics.h>
int/*主函数*/ main() {
IMAGE* img;
loadimage(&img, "C:/1/图片/冰雪点卡版/2.bmp", 1600, 900, 0);
printf("Image loaded successfully.\n");
return 0;/*返回0正常退出*/
}
上述代码在用loadimage加载图片,哪里有问题导致无法加载图片
0
价值
1
回答
浏览
EasyX安装问题
为什么这个下载之后在codeblocks上没法用(当我直接打开visual studio就可以直接用可是codeblocks不行),当我把那个vs里的有关easyx.a还有graphycs,h静态文件复制到codeblocks的文件里面后,我的codeblocks不知道为啥被卸载了,运行不了了.
PS:我的电脑是64位系统,然后下载有visual studio 2022,codeblocks.
0
价值
1
回答
浏览
前一个问题已解决。
因为按键按下,会有DOWN 和UP 两种状态~哈哈
void handleUserEvents(ExMessage* msg,Snake *snake,Food *food) {
//ExMessage msg;
Direction dir = snake->direction;
while (peekmessage(msg, EX_KEY,true)) {
std::cout << "PeekMessageA" << std::en