User forums > General (but related to Code::Blocks)

file in subject

<< < (2/3) > >>

oBFusCATed:
Add the different files in two+ different targets...

thanhbuu:
I don't get what you mean (in "two" what?). It always shows the error "multiple definition of `main'". How can I fix this using TWO file in ONE subject? That's what I mean.

oBFusCATed:
What is subject in you language?
In C::B's terms we use 'project'.

What I've ment was:
1. Create a project
2. Create two targets
3. Add the first file to target1
4. Add the second file to target2
5. Build target1 or target2
6. Add virtual target to combine the two targets, so they get built together...

The same can be done with two separate projects...

thanhbuu:
I did as this tutorial to make two targets: http://wiki.codeblocks.org/index.php?title=Creating_a_new_project but it shows this error:


--- Code: ---mingw32-g++.exe: error: unrecognized option '-shared-libstdc++'
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)

--- End code ---
how can I fix it?

oBFusCATed:
Remove the option...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version