Mar 22, 2017 I tried to do a bit of digging around and thought it was a linker problem that's common with windows 10 where windows looks for Winmain to start a program rather than Main. So with this in mind, from DOS, I tried c -mwindows -o hello.exe hello.cpp (as. DEV-C1Liblibmingw32.a(main.o)(.text+0x8e): undefined reference to `WinMain@.' Greets, Mister Maust. Try creating a console program (somewhere in `Project.
![]() Undefined Reference To Winmain Dev C++![]()
I am currently trying to use the SDL2 program. I just have the basic program to set up the window right now, and it doesn't compile.
I am using CLion, and MinGW. It compiles simple programs but I cannot add in SDL2 ERRORS: C:UsersTreyGAppDataLocalJetBrainsToolboxappsCLionch-0171.4073.41bincmakebincmake.exe --build 'C:UsersTreyGCLionProjectsTest Projectcmake-build-release' --target Test_Project -- -j 8 Scanning dependencies of target Test_Project [ 50%] Building CXX object CMakeFiles/Test_Project.dir/main.cpp.obj [100%] Linking CXX executable Test_Project.exe CMakeFilesTest_Project.dirbuild.make:96: recipe for target 'Test_Project.exe' failed CMakeFilesTest_Project.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x1b): undefined reference to `SDL_Init' CMakeFilesTest_Project.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x4d): undefined reference to `SDL_CreateWindow' CMakeFilesTest_Project.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x60): undefined reference to `SDL_Delay' CMakeFilesTest_Project.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x65): undefined reference to `SDL_Quit' CMakeFilesTest_Project.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x72): undefined reference to `SDL_GetError' C:/Code/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain' collect2.exe: error: ld returned 1 exit status mingw32-make.exe[3]: *** [Test_Project.exe] Error 1 mingw32-make.exe[2]: *** [CMakeFiles/Test_Project.dir/all] Error 2 CMakeFilesMakefile2:66: recipe for target 'CMakeFiles/Test_Project.dir/all' failed mingw32-make.exe[1]: *** [CMakeFiles/Test_Project.dir/rule] Error 2 CMakeFilesMakefile2:78: recipe for target 'CMakeFiles/Test_Project.dir/rule' failed Makefile:117: recipe for target 'Test_Project' failed mingw32-make.exe: *** [Test_Project] Error 2 Undefined Reference To CComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |