I´ve been programming a B tree structure in C and i had problems because I programmed it in Debian Sarge and when I wanted to compile the source code in other distribution of Linux the program did not work correctly...
The IDE i used is Anjuta...
Anybody has idea why i had this problem???
when I used the executable file in other distribution i don't have this problem but I could 't recompile it with the same IDE.

Sorry for my english... I wish anybody could help me....

thanks.

If you had compile errors, post the code and the compile errors. Otherwise you will only get generalized answers, saying this or that may be the problem.

there no compile errors... the program execute bad... it returns diferents results than the original one which works good...

Okay then. post the code, and the results you get for same input in different operating systems.

> it returns diferents results than the original one which works good...
Development stops when the program produces the expected answer, not when it is bug free.

Porting to another platform is usually when a whole host of previously hidden bugs first make an appearance.

In essence, you need to do some debugging of the code on the new system to find the problems and fix them.

Things to check:
Which version(s) of the compiler are you using. Type 'gcc -v' at the prompt to see.

Are you compiling with maximum warning levels (-Wall), and is the code clean compiling on both systems?
If you're presently ignoring warning, then that is something you definitely need to fix.

On either system, do you have either 'valgrind' or 'electric fence'. Both of these can be used to find an awful lot of suspicious (and incorrect) use of memory.
For example one version of malloc might clear memory, whereas the other returns random junk. If the code is implicitly assuming that malloc clears memory, then it's wrong.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.