Dark Bit Factory & Gravity

PROGRAMMING => C / C++ /C# => Topic started by: Clyde on March 04, 2009

Title: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 04, 2009
Completely struggling with this.

Have downloaded Pixel Toaster, the new name for TinyPTC. But have no idea what is supposed to go where, in a directory similar fashion to Freebasic with inc and win32 folders.

I do hope that its possible to have them in one place, and I havent got to have all the Pixel Toaster stuff in every new project. Hope this also applies to any other libraries.

And it also goes on about a makefile whatever that is.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: benny! on March 04, 2009
I can remember having some trouble with PixelToaster too
when I first tried it (http://labs.weltenkonstrukteur.de/hypnosis).
I'll see if I can find the whole project on my harddrive - if so
I can send it to you, maybe that helps. Although I changed
the computer 2 times since then - so I hope I will find it on
any backup device.

Personally however, it wasnt that much fun to work with
PixelToaster - I liked libraries like SDL much more to achieve
fast some simple effects.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 04, 2009
Thanks mate, I have the download allready - if thats any consollation.

Just don't know where to store the files; I am hoping that its like the same method with Freebasic with putting them in one place for the compiler to look for them.

Cheers.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Jim on March 04, 2009
Haven't looked at it, but in general it will build and produce a .lib file.  That file is taken and renamed to a .a file and put in the FB lib directory.  There'll be a .bi file hanging around too which you stick in the inc folder.  You won't need any of the other files in your other projects.

No idea why you'd want to use PixelToaster though - what's missing from our PTC_EXT?

Jim
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 04, 2009
Im using PixelToaster 4.0 ( or trying to ) as it's for C++ NOT Freebasic.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Jim on March 04, 2009
OK, it'll create a .lib file which you'll be able to link with in the Additional Libraries in the Linker Options in Project Properties - add the .lib to the list.  There'll be an .h file somewhere which you will need to copy over to your project.

Jim
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 04, 2009
Thanks will have a fiddle this afternoon.

Im still not 100% what I am supposed to do with the files included in the zip, the readme didnt tell me a busting lot, apart from that I need to install the DX SDK, which I knew about allready. Where do I extract them too? Is there like a main resource libraries folder(s) like the freebasic setup of putting a's in your win 32 and includes ( headers ) in an lib\includes ?

And I think im with you now, about the use of TinyPTC_Ext, i think you are getting at that Its possible to port this into use for C++.

Many thanks,
Clyde.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: hellfire on March 04, 2009
Quote
what I am supposed to do with the files
Put them wherever you like and add the additional include- and library-path in your project-settings:
(http://www.lemurproject.org/images/VS_Net_AdditionalIncludes.jpg)
(library-path is in "linker")

Alternatively add the paths globally in the visual-studio options:
(http://wiki.slimdevices.com/uploads/9/9f/VisualStudio2.png)
(images are randomly taken from google)
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 04, 2009
Nice one and cheers for that Hell Fire dude, and everyone else on this beginners CPP quest.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Jim on March 04, 2009
I would suspect the package contains a pre-built .lib and .h file.  There's no need to install the dxsdk unless you want to re-build the library from the source, or you want to write your own code that calls directx itself in your own cpp files.

Jim
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 08, 2009
So, for every single program I attempt I must include the .h file for that library into the same place as my code? Or are you saying, it just needs to go into the VC++ Directories?

Still a little Fuzzy Wuzzy,
Clyde.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: hellfire on March 09, 2009
Quote
I must include the .h file for that library into the same place as my code?
When you put all required files into your project-directory, VisualStudio will find the files without adding additional paths.
However, that will completely mess up your project when using many external libraries and makes it difficult to keep track of the relevant parts of your code.
It's much cleaner to put each lib (including headers and such) to its' own directory and add the required paths as shown above.
For example you don't want to copy the complete directx-sdk into every project you start...
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 12, 2009
Slowly getting chances to dabble with the express version of Visual Studio 08.

I was under the impression that the DX SDK came included in the installation? But I used pixel toaster again, and this time it told me it couldnt find the dx9 includes. Perhaps they have been put in a different place.

If I do need it, im not entirely sure what version of the Platform SDK I need ( that is briefly mentioned in the small readme file ), or were to find it.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: hellfire on March 12, 2009
The platform-SDK is included in VS Express 2008, the DirectX-SDK is not.
Title: Re: [C++] Pixel Toaster - Visual Studio 2008 Express
Post by: Clyde on March 12, 2009
Ah ok thanks man.