标题:undefined reference to `loadimage(IMAGE*, char const*, int, int, bool) ...
只看楼主
小丑眼泪
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2018-3-24
 问题点数:0 回复次数:2 
undefined reference to `loadimage(IMAGE*, char const*, int, int, bool)'
这个问题到底怎么解?求助大神啊
程序代码:
#include<graphics.h>
#include<iostream>
#include<easyx.h>

void initGame();



int main()
{
    initGame();
    getchar();
    
    return 0;
}

void initGame()
{
    initgraph(600,500);
    
    loadimage(NULL,"背景.jpg");    
}



the wrong:C:\Users\ADMINI~1\AppData\Local\Temp\ccwGMKrC.o    In function `initGame()':
19        C:\Users\Administrator\Desktop\五子棋.cpp    undefined reference to `initgraph(int, int, int)'
21        C:\Users\Administrator\Desktop\五子棋.cpp    undefined reference to `loadimage(IMAGE*, char const*, int, int, bool)'
C:\Users\Administrator\Desktop\collect2.exe    [Error] ld returned 1 exit status
搜索更多相关主题的帖子: undefined reference const int bool 
2018-03-24 17:52
小丑眼泪
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2018-3-24
得分:0 
大神们
2018-03-24 18:00
花脸
Rank: 8Rank: 8
等 级:蝙蝠侠
威 望:9
帖 子:788
专家分:907
注 册:2017-1-4
得分:0 
include <windows.h>少了这个头文件吧,loadimage函数没定义。
2018-03-24 22:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-485543-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.551215 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved