IĮntry for the resource compiler has been incorrect. There is no x86_64-w64-mingw32-windres.exe in MinGW/bin, just windres.exe. All things including Boost work fine, except for the resource compiler.Īfter changing from x86_64-w64-mingw32-windres.exe to windres.exe the build has produce no errors. I have Mingw version 4.8.1 and Code::Blocks version is 12.11. When I go to project's Properties and then to Build Targets I see that main.cpp and MoviesList.rc are checked, which should be correct. Resource compiler: x86_64-w64-mingw32-windres.exe So use main function in the cpp file which you want to start with.
Go set the default project directory to somewhere under C:\Users\you (where you is your windows user name) You could do C:\Users. My 'guess' is the default directory is somewhere under C:\Program Files x86\CodeBlocks\. Linker for static libs : x86_64-w64-mingw32-ar.exe Answer (1 of 3): Your entire project can't have more than one main function. Move out of code::blocks and see if you can successfully build from the command line. Go set the default project directory to somewhere under C:\Users\you (where you is your windows user name) You could do C:\Users\you\codeblocks, but since I don't like typing, I just use C:\Users\me\cb David C. Linker for dynamic libs: x86_64-w64-mingw32-g++.exe My 'guess' is the default directory is somewhere under C:\Program Files x86\CodeBlocks\. Nothing to be done (all items are up-to-date).Ĭompiler setup is the following: C compiler: x86_64-w64-mingw32-gcc.exe I get this compile error all the time: x86_64-w64-mingw32-windres.exe -J rc -O coff -i C:\_C_~1\PROJECTS\test2\MOVIES~1.RC -o obj\Debug\MoviesList.resĮxecution of 'x86_64-w64-mingw32-windres.exe -J rc -O coff -i C:\_C_~1\PROJECTS\test2\MOVIES~1.RC -o obj\Debug\MoviesList.res' in 'C:\_C++\PROJECTS\test2' failed. save your file changes, by checking Auto Save in the main File menu. HRSRC resInfo = ::FindResource(0, MAKEINTRESOURCE(IDR_TEXT1), RT_RCDATA) After configuring VS Code, you will compile and debug a simple C++ program in VS. C/C++ sources and the corresponding header files.
IDR_TEXT1 RCDATA "C:\\_C++\\PROJECTS\\test2\\MoviesList.txt" In CodeBlocks, the sources and the settings for the build process are stored in a project fileBut, note that you can only define one function with the same name and arguments in the entire program, so you can't put it in both main.cpp and test.cpp. The name of the file doesn't matter, so you could write a function with the signature main () in test.cpp. I like Code::Block, but I can't make resource compiler get working. 2 Answers Sorted by: 2 The first function called in a C++ program is main ().