User forums > Using Code::Blocks

Multiple definition during linking console executable

<< < (3/3)

wzyjy:

--- Quote from: oBFusCATed on December 14, 2010, 05:25:25 pm --- create one project with multiple targets (see the codeblocks.cbp file)

--- End quote ---

Could you please tell me how I can do this? Thanks.

Jenna:

--- Quote from: wzyjy on December 14, 2010, 05:15:45 pm ---
--- Quote from: reckless on December 14, 2010, 05:05:41 pm ---can easily get around it by supplying -Wl,--allow-multiple-definition to the linker flags.



--- End quote ---

Sorry I just started to use C:B but could you clarify how exactly I can do that, please?

--- End quote ---
If you have multiple definitions of main, this will most likely not help.

You will not be able to get a working executable.

Maybe you should buy you a good book about programming, or search the web for a good tutorial.
If you do not understand what you do, you will never be able to make it work.

reckless:
my bad didnt notice the part with multiple main.

in that case aye it will most probably not work.

but for reference the -Wl,--allow-multiple-definition goes in build options/linker settings/other linker options.

Navigation

[0] Message Index

[*] Previous page

Go to full version