I have tried to compile some C++ WIN32 code with GCC through DevC++ (MinGW GCC). It seams that it failed to link the objects and it didn’t give me a clear error message: “[PathToSource] > Error 1”.
Tried the same thing with Eclipse (MinGW GCC) and it compiled. However, not all of the resources show as I have an icon set to compile as the icon of the application, it’s loaded from the resource files. I also get a console window in the background as I run the application.
What is the cause of this? How can I make the resource files compile with the code and also avoid the loading of a console window in the background.
I was also wondering if there’s a way to compile WIN32 code in Linux through GCC, or a way to port it for the same compiler.
Resource files in Eclipse:
In the Build Steps of the project, there needs to be entered the command and the full path to the resource and its output file.
In the Tool Settings of the project in the linker options, the path to the resource output file needs to be added in order for the resources to be linked into the executable file.
Avoid the console window:
A linker flag needs to be specified for GUI only.
In Eclipse:
Enter the flag in the project Tool Settings in Linker flags.