> Im having some trouble accessing functions from the pm shared code which
are
> in cpp files. It seems that it doest like externs (well it can never find
the
> links).
>
> I cant really move all of the code into pm_shared because its also used by
> triapi and on the serverside for some effects (and is also all based on
> Vectors and not vec3_ts).
>
> Is it possible?

C modules can't access C++ functions unless you've declared the C++
functions as 'extern "C"'.  The C code also won't be able to handle the
Vector class since C doesn't know classes.

You can rename the .c files to .cpp to compile them as C++ modules instead
of C modules (you might have to sort through several warnings/errors since
C++ is more picky than C).

It might be simpler just to copy the functions you need into a .c file and
modify the Vector class stuff to use vec3_t arguments and functions instead
of using the class functions (i.e. use VectorAdd instead of v_src + v_dest).

Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to