migration to Eclipse

4 views
Skip to first unread message

Habbit

unread,
Dec 15, 2009, 7:23:03 AM12/15/09
to Discuss a Human Project
What is better now - use MSDEV or wait until finishing with Eclipse
setup (if it will be soon)?

Phoenix

unread,
Dec 15, 2009, 7:25:38 AM12/15/09
to Discuss a Human Project
I tried porting on eclipse but its giving lots of errors, specially
with generic library. Seems like we need to continue with MSDEV and
along with it give some time to port on Eclipse.

Phoenix

unread,
Dec 15, 2009, 7:45:21 AM12/15/09
to Discuss a Human Project
I am facing problem in file aibasetypes.h , in following code lines.

T *l_value; line 843 its saying T undeclared.
ASSERT( index >= 0 && index < n ); line 182, index undeclared
ASSERT( p_from >= 0 && p_from < n ); line 548, n undeclared

It seems error but i dont know hoe NSDEV is compiling without any
error.

kindly guide.

Phoenix

unread,
Dec 15, 2009, 7:50:37 AM12/15/09
to Discuss a Human Project
is TIXML_USE_STL defined as its giving error as it cannot find the
file tinystr.h included in tinyxml.h

On Dec 15, 5:25 pm, Phoenix <sarbjit.lon...@gmail.com> wrote:

Phoenix

unread,
Dec 15, 2009, 7:52:32 AM12/15/09
to Discuss a Human Project
where is eh.h included in engine.cpp?

Habbit

unread,
Dec 15, 2009, 8:14:38 AM12/15/09
to Discuss a Human Project
yes, they are errors - but looks like until used anywhere they do not
generate errors.

committed.

Habbit

unread,
Dec 15, 2009, 8:16:39 AM12/15/09
to Discuss a Human Project
yes - TIXML_USE_STL is set in MSDEV - so xml is using STL string

Habbit

unread,
Dec 15, 2009, 8:17:56 AM12/15/09
to Discuss a Human Project

#include "aiengine_impl.h"
#include <windows.h>
#include <eh.h>

AIEngineImpl *AIEngineImpl::instance = NULL;

/
*#########################################################################*/
/
*#########################################################################*/

Phoenix

unread,
Dec 15, 2009, 8:18:08 AM12/15/09
to Discuss a Human Project
I have ported AIEngine to eclipse, there are some link errors as I
need to generate the libraries of other projects using eclipse. I will
do it ASAP, till than you can continue using MSDEV. Probably by EOD
tomorrow, i should be done.

Phoenix

unread,
Dec 15, 2009, 8:19:27 AM12/15/09
to Discuss a Human Project
I mean that i could not find eh.h file anywhere, its giving inclusion
error in file :)

Habbit

unread,
Dec 15, 2009, 8:21:54 AM12/15/09
to Discuss a Human Project
:)

it i std microsoft file in C:\Program Files\Microsoft Visual Studio
\VC98\Include\

used for exception handling:

#ifndef _MAC
struct _EXCEPTION_POINTERS;
typedef void (__cdecl *_se_translator_function)(unsigned int, struct
_EXCEPTION_POINTERS*);
#endif

_CRTIMP terminate_function __cdecl set_terminate(terminate_function);
_CRTIMP unexpected_function __cdecl set_unexpected
(unexpected_function);
#ifndef _MAC
_CRTIMP _se_translator_function __cdecl _set_se_translator
(_se_translator_function);
#endif

Phoenix

unread,
Dec 15, 2009, 8:24:09 AM12/15/09
to Discuss a Human Project
In that case we need alternative as its MS specific file and we cannot
use it. I am leaving for day i will continue tomorrow. Also please be
available on gtalk.

Habbit

unread,
Dec 15, 2009, 8:56:45 AM12/15/09
to Discuss a Human Project

Phoenix

unread,
Dec 16, 2009, 3:56:40 AM12/16/09
to Discuss a Human Project
I finished migration of code to eclipse. Its giving a runtime error
while running. Can you review the changes that i did and also fix the
error if possible.

Steps:

1. Download eclipse and install CDT plugin or download eclipse for C/C
++.
2. Open projects in eclipse or copy the projects in eclipse workspace.
3. Add the include directories so that code compiles properly.
4. Add libraries as well as lib paths.
5. Open TODO prespective to see my changes.
6. Fix anything wrong if I have done.

I have uploaded code to folder "Eclipse Code Migration"

Let me know in case you need any help in setting up environment.
After finalizing I will create wiki page for setting up environment.

-Sarbjit

On Dec 15, 6:56 pm, Habbit <vsavc...@gmail.com> wrote:
> I have founfhttp://stackoverflow.com/questions/315948/c-catching-all-exceptions

Habbit

unread,
Dec 16, 2009, 5:08:28 PM12/16/09
to Discuss a Human Project
It takes a time.
After downloading I made some changes.
Also MinGW was downloaded except Eclipse.
Not finished with build - would like to remove all warnings.

Habbit

unread,
Dec 17, 2009, 4:23:50 PM12/17/09
to Discuss a Human Project
ok, finally succeeded - now build is w/o warnings and executable is
running well.
Reason was using proper TLS approach.

btw, cannot find TODO perspective.

Phoenix

unread,
Dec 17, 2009, 11:36:24 PM12/17/09
to Discuss a Human Project
Thats great!!.. To find the TODO tasks go to window > show view >
tasks, you will find the TODO tags that i created, may be we can use
them in future to track the pendind TODO items in existing code.

Habbit

unread,
Dec 18, 2009, 8:38:20 AM12/18/09
to Discuss a Human Project
Was unable to find such a perspective... will double-check a bit
later.

Btw, I think we should discuss build process in IDE - because I don't
like idea of rebuilding all in complex set of dependent projects.

Some configuration management is required.

1. Previously I has intentionally set a boundary between executables
and underlying libraries.

The idea is:
- to have informal library mini-releases for daily work, library
updates are rare, and we can have only its binary committed to exe
repository like any other 3-d party libs
- commit library manually: make change in lib code, commit, copy
binary locally, debug, fix bugs in lib code, commit lib. So you have
an option to change library w/o affecting other apps - in ongoing
development
- batch build, from another hand, has full rebuild approach - for use
in major releases

2. Feeling some uncertainty with Eclipse now.

- do you think it can serve as full-scale long-term development, as
looks like Eclipse is much more adjusted for Java development, while
for C++ people say about problems with debugging
- was unable to find how to rebuild single source file - whether auto-
build feature is really working?
- to have clear understanding what is the current state I invented
Clean/Rebuild all approach - which is not quite efficient. Do you have
any link that could help to understand how to setup Eclipse to have
good feeling with compiling/debugging

Habbit

unread,
Dec 18, 2009, 3:01:49 PM12/18/09
to Discuss a Human Project
Finally found tasks - never used before - how to complete resolve
them?
Also no idea how to resolve Sort template function.

I will be away for 4 days.

Phoenix

unread,
Dec 22, 2009, 5:54:16 AM12/22/09
to Discuss a Human Project
Well even I am facing problems with the eclipse as when we change a
single file we need to build whole project again to create executable.
I think we need to configure it well in order to use it efficiently.

I will see if I can find some website to know how to configure it
well.

I also was looking at VS 2008 and it also can be used, but again its
not open source. May be we should decide whether to continue with
eclipse or not considering the future developments as well as
production. Let me know what you think.

Phoenix

unread,
Dec 22, 2009, 6:05:01 AM12/22/09
to Discuss a Human Project
The other option could be to create shared libraries for pretty much
every module and to create a make file for each and every module and
use it while compiling rather than using build all option.

Phoenix

unread,
Dec 22, 2009, 7:59:28 AM12/22/09
to Discuss a Human Project

I tried codelite and it seems a good IDE. It resembles VS and also
free. I tried debugging and seems fine in that. It uses makefile too.

Try using it , its very light and support plugins too. Let me know
what you think.

Habbit

unread,
Dec 22, 2009, 3:37:30 PM12/22/09
to Discuss a Human Project
Yes, I've tried it - looks amazing for me.

Generally I think we can use anything that fits our need and part of
the mainstream.
First is ok, good responses from community - http://sourceforge.net/projects/codelite/reviews.
Also I have read quite hot discussion Codelite vs Eclipse/Codeblocks -
Codelite is not ideal, but promising.

I vote for trying it.

Phoenix

unread,
Dec 23, 2009, 12:19:46 AM12/23/09
to Discuss a Human Project
ok then lets try it and see what is the feel...

On Dec 23, 1:37 am, Habbit <vsavc...@gmail.com> wrote:
> Yes, I've tried it - looks amazing for me.
>
> Generally I think we can use anything that fits our need and part of
> the mainstream.

> First is ok, good responses from community -http://sourceforge.net/projects/codelite/reviews.

Phoenix

unread,
Dec 23, 2009, 6:29:46 AM12/23/09
to Discuss a Human Project
I have ported the code on codelite and checked in. All the modules are
building and i am trying to create executable using generated
libraries.

Phoenix

unread,
Dec 23, 2009, 7:47:03 AM12/23/09
to Discuss a Human Project
I tried creating executable but its giving some link errors in module
aiengine. Kindly see if you can remove those.

My opinion is that this seems a good IDE and we should stick with
this.
Let me know your views.

Habbit

unread,
Dec 23, 2009, 8:07:35 AM12/23/09
to Discuss a Human Project
I've tried also, except GUI - looks ok.

I see several new items in the code:

- modules as separate projects, different types of targets are on the
same level
- folder structure differs from project view
- stacktrace code mixed to our code
- including fann code "as is"
- common headers are not presented in the sources in codelite
- dependencies are checked in with other files (why we need them on
codebase?)

We have to agree about general principles:

- add new features w/o agreements - just describing on related speclet
- avoid delete existing features w/o discussion

I would like to establish proper configuration management practices
from the very beginning.
Generally CM should help us to see our changes within observable set
of release targets, each with its own release history.
Configuration items are arranged by levels - deployment targets ->
release targets -> code units (last consist of files)

Release targets mostly defined by closely related bunches of work
averaged for overall lifecycle.

For this project the optimal release target list can be:

- generic (all utilities not related to AI topics)
- AI library (common AI technologies and algorithms)
- AI engine (our sole code)
- AI toolkit (a set of test apps)
- AI db (persisted AI knowledge and memory)

Each target will have its own version.
I don't like both single-target dev and extra-fine-grained target
list.

Next, we can establish separate target, when its interfaces are stable
enough.
For AI library we don't have clear interfaces now - and better to have
it inside AI engine for debug purposes.

Re FANN - I have integrated its code as modnn, and added some
enhancements.
But I am not sure what approach is the best - having external lib "as
is" with our wrapper over it or grabbing its code - because our
framework has some specific items - logging, exception handling,
configuring and extra concepts (like variables).
Any case we need to discuss it.

For now - I would suggest to allow me to replace code in mainline with
nearly the same structure as before but ported to Codelite.
From what I see I think we step over IDE selection step.

Let me know what you think.

Phoenix

unread,
Dec 24, 2009, 12:00:17 AM12/24/09
to Discuss a Human Project
Regarding the changes that you see..they are temporary...i made the
changes to the different code base so that our old code remains
same..whenever i make some changes its actually under review by you.
So the agreement is already under practice to discuss before making
any major changes.

I was not sure about the implementation of modnn, so i checked in the
fann library. It can be removed

I do agree with the general principles, i dont have any issues with
that.
I do agree with your release target list.

You can make changes any time and let me know when done so that I can
take the updated code.

Habbit

unread,
Dec 24, 2009, 1:26:47 AM12/24/09
to Discuss a Human Project
ok, I will commit now the resulting changes.

Btw, I don't understand some things in your migrated branch:

- for some reason, Subversion plugin is not attached in workspace I
have created - I do not see Tortoise-like check icons
as in your workspace
- also, looks you had some idea of having dependency files checked in
repository - could you please clarify that
- not sure what is the exact toolset is required for full-scale
development (I have installed Codelite, MinGW, OpenSSH) - I see you
are quite experienced with new tools - I would suggest to update a
page with project setup for newcomers, including tools install (with
specific versions), debug sequence, maybe also working with Subversion

Phoenix

unread,
Dec 24, 2009, 1:32:36 AM12/24/09
to Discuss a Human Project
ok great...

I was also looking at the subversion plugin but it was not working for
me. I still need to do some research for that.

Dependency files are not needed in codebase can be removed. I just
commit everything so that you dont have to build everything. Once
finalised we just need to keep code files niot any .0 or .0.d files.

I will write a wiki page for that. I am using tortoise svn tool for
checkin in and managing my local codebase. Apart from that I am using
MINGW. Thats about it. Still I will write a wiki page.

Habbit

unread,
Dec 24, 2009, 4:19:57 AM12/24/09
to Discuss a Human Project
All is checked in.

I have applied the same structuring approach for all projects.
Will describe it later today on Wiki.

Still not done:
- unable to build aiconsole - unresolved socket api functions, though -
lws2_32 is in command prompt - can you have a look?
- aihtmview not migrated - it will require some GUI investigations
- when tried to start aiengine, it showed msgs that libgcc_s_dw2-1.dll
is not found - I would like to revert to static linking to avoid extra
runtime dependencies - do you know how to do that?
- not tried debug sequence

also - TBD covered by build and deployment task:
- automate / describe local build and deployment procedure (for debug
in IDE)
- automate / describe release build procedure
- automate / describe deployment

Habbit

unread,
Dec 24, 2009, 4:21:46 AM12/24/09
to Discuss a Human Project
btw, I will close this topic and start migration to Codelite to be
consistent
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages