Author Topic: Compilation Error on CodeBlocks  (Read 6965 times)

Offline Fredy

  • Single posting newcomer
  • *
  • Posts: 3
Compilation Error on CodeBlocks
« on: September 23, 2023, 06:02:35 pm »
Code
I am running Code::Blocks version 16.01 on windows 10. The compiler I use is GNU GCC Compiler. Version, I am not sure. When I try to compile a multiple-source file program, it just could not compile. I tried saving both source files on the same directory but it could not work. I have attached the build logs and build messages on this post. Any help?

 

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1628
Re: Compilation Error on CodeBlocks
« Reply #1 on: September 23, 2023, 06:40:10 pm »
You must add whatever file contains WinMain to the linker.

You have used code tags (the #) for the description, please use them (only) for attaching logs and messages instead of using images.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Compilation Error on CodeBlocks
« Reply #2 on: September 24, 2023, 07:26:41 pm »
...fixed in revision 13360. Sorry about that, I forgot to select one file on the initial commit
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Compilation Error on CodeBlocks
« Reply #3 on: September 25, 2023, 02:24:17 am »
...fixed in revision 13360. Sorry about that, I forgot to select one file on the initial commit

Hi, Morten, thanks. But you replied in the wrong thread.

It should be here: https://forums.codeblocks.org/index.php/topic,25527.msg173806.html#msg173806
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.