L
L
logan baby2021-08-11 17:18:37
C++ / C#
logan baby, 2021-08-11 17:18:37

How to fix project build error when connecting sdl?

Hello. I'm new to c++, recently graduated from inheritance and decided to move on to learning the SDL graphics library. I installed the latest version of the library, connected it to the project, but an error occurs at the project build stage (and not in the code itself, but in the project).
my code:
#include

using namespace std;

int main()
{
if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO))
{
exit(1);
}
}

Error text:
1>MSVCRTD.lib(exe_winmain.obj) : error LNK2019: reference to unresolved external symbol [email protected] in function "int __cdecl invoke_main(void)" ([email protected]@YAHXZ).
1>C:\Users\User\source\repos\Project10\Debug\Project10.exe : fatal error LNK1120: unresolved externals: 1
1>Building project "Project10.vcxproj" failed.
Screenshot of the error:
6113dc00a2ee5883953270.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2021-08-11
@wataru

You seem to have created a normal window project, but you should have created a console application. It will be easiest to recreate the project. Be careful what you choose there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question