I have two examples:
test.cbp exibits the behavior described. It will compile even when no changes have been made.
Test2.cbp does not exibit the constant compile problem.
The directory structures are exactly the same:
Wierd!
test.cbp
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="5" />
<Project>
<Option title="test" />
<Option pch_mode="2" />
<Option default_target="" />
<Option compiler="gcc" />
<Option virtualFolders="" />
<Build>
<Target title="Release">
<Option output=".\test.exe" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="src\main.cpp">
<Option compilerVar="CPP" />
<Option target="Release" />
</Unit>
</Project>
</CodeBlocks_project_file>
Test2.cbp
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="5" />
<Project>
<Option title="Test2" />
<Option pch_mode="2" />
<Option default_target="" />
<Option compiler="gcc" />
<Option virtualFolders="" />
<Build>
<Target title="Release">
<Option output=".\Test2.exe" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="src\main.cpp">
<Option compilerVar="CPP" />
<Option target="Release" />
</Unit>
</Project>
</CodeBlocks_project_file>
(http://img53.imageshack.us/img53/3776/0083vs2.png)
But... Look, Test2 has a .depend while test does not. Why is that?
(http://img122.imageshack.us/img122/1444/0084qw3.png)
However, when I copy Test2.depend and edit it for test.depend, it has no effect on the behavior.
# depslib dependency file v1.0
1152747736 source:c:\temp\test\src\main.cpp
<iostream>
Done.. I;m stumped :^[
Well, the Irrlicht project is way to big for this (about 290 cpp files) !!!
But I have a little project that I tested like you said, but no changes, all is build every time !!!
this are the 3 project files:
main.cpp#include "cMapDemo.h"
int main(){
cMapDemo demo;
demo.run();
return 0;
}
cMapDemo.h#ifndef CMAPDEMO_H
#define CMAPDEMO_H
#include <Irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
class cMapDemo : public IEventReceiver{
private:
IrrlichtDevice* device;
IVideoDriver* driver;
ISceneManager* smgr;
IGUIEnvironment* env;
bool prgDead;
bool terraWireframe;
bool showPathNodes;
ITerrainSceneNode* terrain;
ICameraSceneNode* camera;
public:
virtual bool OnEvent(SEvent event);
void run();
};
#endif // CMAPDEMO_H
cMapDemo.cpp#include "cMapDemo.h"
bool cMapDemo::OnEvent(SEvent event){
if(event.EventType == EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown){
switch(event.KeyInput.Key){
case KEY_ESCAPE:{
prgDead = true;
return true;
}break;
case KEY_F1:{
terraWireframe = !terraWireframe;
terrain->setMaterialFlag(EMF_WIREFRAME, terraWireframe);
return true;
}break;
case KEY_F2:{
showPathNodes = !showPathNodes;
return true;
}break;
}
}
return false;
}
void cMapDemo::run(){
prgDead = false;
terraWireframe = false;
showPathNodes = false;
device = createDevice(EDT_DIRECT3D9, dimension2d<s32>(640, 480));
device->setEventReceiver(this);
driver = device->getVideoDriver();
smgr = device->getSceneManager();
env = device->getGUIEnvironment();
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
device->getCursorControl()->setVisible(false);
SKeyMap keyMap[8];
keyMap[0].Action = EKA_MOVE_FORWARD;
keyMap[0].KeyCode = KEY_UP;
keyMap[1].Action = EKA_MOVE_FORWARD;
keyMap[1].KeyCode = KEY_KEY_W;
keyMap[2].Action = EKA_MOVE_BACKWARD;
keyMap[2].KeyCode = KEY_DOWN;
keyMap[3].Action = EKA_MOVE_BACKWARD;
keyMap[3].KeyCode = KEY_KEY_S;
keyMap[4].Action = EKA_STRAFE_LEFT;
keyMap[4].KeyCode = KEY_LEFT;
keyMap[5].Action = EKA_STRAFE_LEFT;
keyMap[5].KeyCode = KEY_KEY_A;
keyMap[6].Action = EKA_STRAFE_RIGHT;
keyMap[6].KeyCode = KEY_RIGHT;
keyMap[7].Action = EKA_STRAFE_RIGHT;
keyMap[7].KeyCode = KEY_KEY_D;
camera = smgr->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8);
camera->setPosition(core::vector3df(0,2055,-1110));
camera->setTarget(core::vector3df(0,0,10));
camera->updateAbsolutePosition();
camera->setFarValue(12000.0f);
// create a new (correct) terrain
terrain = smgr->addTerrainSceneNode2("Media/heightmap2.bmp");
terrain->setScale(vector3df(40.0, 1.0, 40.0));
terrain->setPosition(vector3df(0.0, 0.0, -10.0));
terrain->setMaterialFlag(EMF_LIGHTING, false);
terrain->setMaterialTexture(0, driver->getTexture("Media/terratex2.bmp"));
ITriangleSelector* selector = smgr->createTerrainTriangleSelector(terrain, 0);
terrain->setTriangleSelector(selector);
selector->drop();
while(device->run() && !prgDead){
if(device->isWindowActive()){
driver->beginScene(true, true, 0 );
smgr->drawAll();
env->drawAll();
driver->endScene();
}
}
device->drop();
}
But what is really curious is that it does not recompile if I add the external include dir for Irrlicht to the default compiler settings and not to the project's compiler settings !?!?!
Also all is correct if I delete all the Irrlicht related stuff out of cMapDemo.cpp and cMapDemo.h !?!?!
EDIT:
I also tested it with some other sdks like Newton Physics !!!
The same behavior, if the include dir is added to the project settings it recompiles always !!!
If the include dir is added to the default settings, all is correct !!!
So I think there must be the error with the project's compiler settings include dirs !?!?!
Hi there, I have downloaded CB rev 3222 for amd64 Ubuntu, I have installed an anterior version, but it give me following dependency problems... I use synaptic but down know how to solve this... the question is is there a build around, that can be installed on my system¿? (I have installed before one of Septemter, but Im unable to find the archive in my disc :S)
root@hecatombe-64:/programador/Descargas# dpkg -i CB_20061115_rev3222_Ubuntu6.10-amd64.deb
(Leyendo la base de datos ...
255954 ficheros y directorios instalados actualmente.)
Preparando para reemplazar codeblocks 1.0svn (usando CB_20061115_rev3222_Ubuntu6.10-amd64.deb) ...
Desempaquetando el reemplazo de codeblocks ...
dpkg: problemas de dependencias impiden la configuración de codeblocks:
codeblocks depende de libatk1.0-0 (>= 1.12.1); sin embargo:
Versión de libatk1.0-0 en el sistema es 1.11.4-0ubuntu1.
codeblocks depende de libc6 (>= 2.4-1); sin embargo:
Versión de libc6 en el sistema es 2.3.6-0ubuntu20.
codeblocks depende de libcairo2 (>= 1.2.4); sin embargo:
Versión de libcairo2 en el sistema es 1.0.4-0ubuntu1.
codeblocks depende de libgcc1 (>= 1:4.1.1-12); sin embargo:
Versión de libgcc1 en el sistema es 1:4.0.3-1ubuntu5.
codeblocks depende de libglib2.0-0 (>= 2.12.0); sin embargo:
Versión de libglib2.0-0 en el sistema es 2.10.3-0ubuntu1.
codeblocks depende de libgtk2.0-0 (>= 2.10.3); sin embargo:
Versión de libgtk2.0-0 en el sistema es 2.8.20-0ubuntu1.
codeblocks depende de libpango1.0-0 (>= 1.14.5); sin embargo:
Versión de libpango1.0-0 en el sistema es 1.12.3-0ubuntu3.
codeblocks depende de libstdc++6 (>= 4.1.1-12); sin embargo:
Versión de libstdc++6 en el sistema es 4.0.3-1ubuntu5.
codeblocks depende de libwxbase2.6-0 (>= 2.6.3.2.1.5); sin embargo:
el paquete libwxbase2.6-0 no está instalado.
codeblocks depende de libwxgtk2.6-0 (>= 2.6.3.2.1.5); sin embargo:
Versión de libwxgtk2.6-0 en el sistema es 2.6.1.2ubuntu2.
dpkg: error al procesar codeblocks (--install):
problemas de dependencias - se deja sin configurar
Se encontraron errores al procesar:
codeblocks
Update: I finally searched manually and finded codeblocks_svn-2953-ubuntu_amd64 and installed it again, now all is fine.