Re: Breaking the 10-limit : Problems/Questions for Windows build

Mart Kelder <[email protected]>
Newsgroups gmane.games.torcs.devel
Message-ID <[email protected]>
Hi Jean-Philippe (and others),

Op Monday 31 March 2008 23:11:28 schreef Annick et Jean-Philippe:
> Hi, All.
>
> I'm working now on breaking the "10 cars per robot" and the "10 human
> players" limits (that is the "10 interfaces per dynamically loadable
> module" limit).
>
> For that, I "simply" changed the signature of the init function of a module
> :
>
> from : typedef int (*tfModInfo)(tModInfo*);
> to   : typedef int (*tfModInfo)(std::vector<tModInfo>&);
>
> This works like a charm under Linux GCC 4.2 (I added an 11th car to BT,
> as an exemple), but under Windows XP VC6 SP6, it's a bit harder ;-)
>
> After some searches on the internet, it seems that to be able to pass
> std::vector across DLLs, ALL the code MUST be linked against
> the "Multi-threaded DLL" (+ debug if relevant) run-time library (MSVCRT)
> (ALL means ANY DLL, static lib and executable).

std::vector is part of C++, not of C. Having a init function like this 
requires the robots to be written in C++: C is not an option any more after 
this change. I don't know for sure if pure C-robots are possible at the 
moment.

> So, question # 1 :
> And, question # 2 :

I don't know much about the Windows build.

> And if you have any other suggestions to fix the Windows build ...
>
> Thanks in advance for your help.
>
> Jean-Philippe
>
> PS: If needed, I can also give you the patch ...

I also made something like this some time ago, but I did it on a slightly 
different way. The problem I wanted to solve is that it is hard to drive 
against 10 formula one cars, for example. So I added a way to select a robot 
and a car (the list of cars is limited by the robot) and add such a robot. So 
you can add 15 identical robots of the same car type.

Regards,

Mart

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.