Re: [pygccxml-development] inline asm
Brought to you by:
mbaas,
roman_yakovenko
From: Thomas R. <tho...@gm...> - 2008-08-17 01:59:03
|
> Maybe he rather means whether *gccxml* supports inline asm. I actually > don't know the answer to that but I would imagine that it supports the > same syntax that gcc supports. Seeing that the posted code has a #ifdef > WIN32, it looks like those assembler statements might only be understood > by the Microsoft compiler. > > If this is the problem then it's similar to a problem I once had on OSX > where some system headers use code in some inline functions that is > specific to Apple's version of gcc. Of course, gccxml didn't understand > those things and issued an error. > My workaround to this problem was to create local copies of those system > headers and remove the function bodies. I could then use those copies > when running gccxml and use the original headers when compiling the > code. It's a bit awkward, but it works. > > > It doesn't matter in which header a function is declared (unless you > explicitly restrict a query to certain headers). > > Is the NxMath class inside a namespace? Then you would have to search > that namespace instead of the root namespace (or use the recursive flag). > > >> But that didn't work either. -Tom > > What do you mean by "it didn't work"? Did it produce an error message? > If so, what was that error? Or did everything run fine but your Python > module just contained more stuff than you wanted? > As Roman said, you should be more specific as to what the actual problem > is (it might also help knowing if you are actually on Windows or not (or > if you did define WIN32 yourself)). > > - Matthias - > > > > Sorry for not being more clear. Yes, I suppose I did mean if gccxml supports inline assembly. I thought the answer would be no though, as I has checked if GCC supported inline asm and it looks like it does, but you need to do some things before it's able to work. I didn't really read into detail though. Anyway, that is fine. I can exclude the function. I'll try to explain the header problem more throughly. You answered the first part for me Matthias, thanks. I hadn't actually checked if it was in another namespace (doh!), I was trying to find the correct syntax earlier though. Can I do this for instance: inlineASM = mb.namespace("foo").class_("NxMath").member_function("bar") inlineASM.exclude() Right now because of this function I can't generate any code at all. Here is the error I get: C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.1/SDKs/Foundation/include/NxMath.h: In static member function `static void NxMath::sinCos(float, NxF32&, NxF32&)': C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.1/SDKs/Foundation/include/NxMath.h:744: error: ` _asm' undeclared (first use this function) C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.1/SDKs/Foundation/include/NxMath.h:744: error: (Each undeclared identifier is reported only once for each function it appears in.) C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.1/SDKs/Foundation/include/NxMath.h:744: error: syntax error before `local' I get this error whether or not I exclude the function (the way I had shown in the previous post). So I'm guess the problem is probably with namespaces and gccxml can not find the function I'm giving it. Sorry if any of these are silly questions. I'm still learning how to use py++ and I've never used GCC before (I've always used Microsoft compilers). GCC surely has some global define like WIN32 and LINUX to determine OS, does it not? I don't think that's a problem though. At least I'm not getting any errors related to it. The errors I posted are the only errors I'm getting at this point. Hopefully I was a bit more clear this time :) - Tom |