简体   繁体   English

SDL C ++错误c3861

[英]SDL C++ error c3861

I have been trying for hours to fix this issue but I can't seem to think what it could be, I'm trying to set up SDL for the first time but I have ran in to so many issues. 我已经尝试了数小时来解决此问题,但我似乎无法想到可能是什么,我正在尝试首次设置SDL,但遇到了很多问题。 I'll leave the code and errors below, thanks in advance. 我将在下面留下代码和错误,在此先感谢。

#include "SDL.h"

int main(int argc, char *argv[])
{

    SDL_Init(SDL_INIT_EVERYTHING);
    SDL_Window *window = SDL_CreateWindow("title", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 600, 400, SDL_WINDOW_SHOWN);
    SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, 0);

    SDL_SetRendererDrawColor(renderer, 0, 255, 0, 255);

    SDL_RenderClear(renderer);

    SDL_renderPresent(renderer);

    SDL_Delay(3000);

    return 0;
}

the errors that come with this : 随之而来的错误:

 identifier "SDL_SetRendererDrawColor" is undefined identifier "SDL_renderPresent" is undefined C3861 'SDL_SetRendererDrawColor': identifier not found C3861 'SDL_renderPresent': identifier not found 

after commenting these two out I get this; 在注释掉这两个之后,我得到了;

'My1stSDL.exe' (Win32): Loaded 'C:\\Users\\Aaron\\Desktop\\My1stSDL\\x64\\Release\\My1stSDL.exe'. 'My1stSDL.exe'(Win32):已加载'C:\\ Users \\ Aaron \\ Desktop \\ My1stSDL \\ x64 \\ Release \\ My1stSDL.exe'。 Symbols loaded. 符号已加载。

'My1stSDL.exe' (Win32): Loaded 'C:\\Windows\\System32\\ntdll.dll'. 'My1stSDL.exe'(Win32):已加载'C:\\ Windows \\ System32 \\ ntdll.dll'。 Cannot find or open the PDB file. 找不到或打开PDB文件。

'My1stSDL.exe' (Win32): Loaded 'C:\\Windows\\System32\\kernel32.dll'. 'My1stSDL.exe'(Win32):已加载'C:\\ Windows \\ System32 \\ kernel32.dll'。 Cannot find or open the PDB file. 找不到或打开PDB文件。

'My1stSDL.exe' (Win32): Loaded 'C:\\Windows\\System32\\KernelBase.dll'. 'My1stSDL.exe'(Win32):已加载'C:\\ Windows \\ System32 \\ KernelBase.dll'。 Cannot find or open the PDB file. 找不到或打开PDB文件。

'My1stSDL.exe' (Win32): Loaded 'C:\\Windows\\System32\\ucrtbase.dll'. 'My1stSDL.exe'(Win32):已加载'C:\\ Windows \\ System32 \\ ucrtbase.dll'。 Cannot find or open the PDB file. 找不到或打开PDB文件。

'My1stSDL.exe' (Win32): Loaded 'C:\\Windows\\System32\\vcruntime140.dll'. 'My1stSDL.exe'(Win32):已加载'C:\\ Windows \\ System32 \\ vcruntime140.dll'。 Cannot find or open the PDB file. 找不到或打开PDB文件。

The thread 0x64f4 has exited with code -1073741515 (0xc0000135). 线程0x64f4已退出,代码为-1073741515(0xc0000135)。 The thread 0x6634 has exited with code -1073741515 (0xc0000135). 线程0x6634已退出,代码为-1073741515(0xc0000135)。 The thread 0x671c has exited with code -1073741515 (0xc0000135). 线程0x671c已退出,代码为-1073741515(0xc0000135)。 The program '[23748] My1stSDL.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'. 程序“ [23748] My1stSDL.exe”已退出,代码为-1073741515(0xc0000135)“未找到相关的dll”。

Two simple typos. 两种简单的错字。

SDL_SetRendererDrawColor -> SDL_SetRenderDrawColor. SDL_SetRendererDrawColor-> SDL_SetRenderDrawColor。

SDL_renderPresent -> SDL_RenderPresent. SDL_renderPresent-> SDL_RenderPresent。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM