User forums > Help
Correct project layout/setup for multiplatform project
oBFusCATed:
Hello,
I wanted to try codeblocks for months but the laziness was stopping me:(
Now I have it installed (rc2 first, now svn) and I like it.
But I don't now how to setup, lay out my project.
It is multy directory project. I have on main directory, and many subdirectories. I have some kind of a project setuped but I get unresolved symbols, when file from the main dir depends on file in subdir.
I also don't know how to set it up for dual os, before codeblocks(kdevelop/vstudio), I have project define WIN32 for window, but it was setuped in different environments, but in cb is in one:)
I also need to have a way to build it in debug/release mode and have DEBUG defines setup appropriate.
Can someone explain the steps I have to make, or point me to a tutorial, explanation of this kind of setup?
Thanks in advance, and happy new year:)
rickg22:
For each target you can specify on build options (or was it in properties?) where the output file will be. Then you'll link that library from your "main" target.
As for debug / release, i think you need to make different targets, specifying debug / release in each.
_OR_ you could copy the project into a new one, and them modify the new project to use different settings. The only problem with that is that you need to keep sync'ed the two projects.
Here's what *I* would do: For your "release project", in the "project build options", add "optimize" and "strip executable", and for your "debug project", add "add debugging symbols" (and your defines) instead. Do this only for the project's settings, not for each target.
oBFusCATed:
Thanks for the reply.
I fixed the problem with the unresolved symbols (bad source code stupid me :( )
So to make things clear. Is this the compiler settings hierarchy (from least to most significant):
1: setting->compiler or build->compiler options // they look and behave the same, correct me if I'm wrong;
2: project->build options->project selected;
3: project->build options->target selected;
If this observation is correct, I would (maybe) setup 3x2 targets, two targets by compiler(gcc/unix, gcc/win, vc/win)
The two project idea is not for me, I don't like to add the same files twice...
And one(hope so) last question, for today:
I saw that there is code highlighting for openGL shading language(and I develop ogl app), how should I add them to the manager, and edit them in C::B
Michael:
--- Quote from: oBFusCATed on January 04, 2006, 08:40:58 pm ---So to make things clear. Is this the compiler settings hierarchy (from least to most significant):
1: setting->compiler or build->compiler options // they look and behave the same, correct me if I'm wrong;
--- End quote ---
What do you mean by "they look and behave the same"? For example, if I set compiler options for debug and release, they will not be the same.
--- Quote from: oBFusCATed on January 04, 2006, 08:40:58 pm ---And one(hope so) last question, for today:
I saw that there is code highlighting for openGL shading language(and I develop ogl app), how should I add them to the manager, and edit them in C::B
--- End quote ---
May be this wiki article could be helpful.
Michael
oBFusCATed:
--- Quote from: Michael on January 04, 2006, 09:27:39 pm ---What do you mean by "they look and behave the same"? For example, if I set compiler options for debug and release, they will not be the same.
--- End quote ---
I was talking for the menu options settings -> compiler & build -> compiler options. They look the same (I'm using c::b from svn, updated yesterday), and behave the same. I made a test to see if this assumption is correct: set the -g option into the first dialog and checked to see what is its value in the second, and they were the same, the reverse is also true.
--- Quote from: Michael on January 04, 2006, 09:27:39 pm ---May be this wiki article could be helpful.
--- End quote ---
This shows how to setup ogl, but I've done that. I want to know how to edit glsl files in c::b, and how to keep them in the project, I suppose it is something related to resource files but I have to investigate a little more.
I hope, I've cleared the missunderstanding from my second post.
Teodor
Navigation
[0] Message Index
[#] Next page
Go to full version