Can't compile a c++ project with OSLib

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Can't compile a c++ project with OSLib

Post by drcd »

Hi everyone
I have a little problem OSLib. I would like to do my project in C++ but when i compile it, i've got an error saying that type bool is redefined in oslib.h. That's true and i want to do #ifdef or just leave the redefintion in the oslib.H but may i?
Brunni
Posts: 186
Joined: Sat Oct 08, 2005 10:27 pm

Post by Brunni »

That's my fault, I've still not released the fix for C++ in OSLib. I'll release a patch soon.
Anyway you can comment the bool typedef, but you also have to add extern "C" surrounding functions prototypes.
Sorry for my bad english
Image Oldschool library for PSP - PC version released
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Post by drcd »

Ok thx.
Great lib!!!
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Post by drcd »

Brunni i have another problem. I deleted the typedef and i put extern "C" for the include but now when i compile your sample, i have got a multiple definition of oslpowercallback and now i can't delete it cause it's in the .o.
Brunni
Posts: 186
Joined: Sat Oct 08, 2005 10:27 pm

Post by Brunni »

I don't know then. But it works with the new version, I'll try to release at least an intermediate version tomorrow ;-)
Sorry for my bad english
Image Oldschool library for PSP - PC version released
Brunni
Posts: 186
Joined: Sat Oct 08, 2005 10:27 pm

Post by Brunni »

New version released. C++ should be okay now :-)
Sorry for my bad english
Image Oldschool library for PSP - PC version released
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Post by drcd »

Héhé thx.
Post Reply