I am a student writing a project about external memory compression and thinking of using Stxxl. I'v been digging on how to set it up for days but still got some problems. I really cannot find much information about it.
I have successfully built the Stxxl project in VC++ 8.0 I believe (libstxxl.lib was created).
My problem is how can I use the library 'libstxxl.lib' for my exist project? I even got no idea how to run the test programs provided.
e.g. I created a separate project for the test program 'test_vector.cpp'. But when I tried to build the project it just simply report an error "Cannot open include file: 'stxxl'". I also tried to change the include statement to "#include <stxxl/containers/vector.h>" then the error becomes "Cannot open include file: 'sys/time.h'" (am I trying to rebuild the library?).
Hope you dont mind such basic questions. The installation guide is too brief (maybe just for me). However, a more detailed guide will be definitely a great help for beginners.
Did you add the paths to Stxxl include and lib files for your project as described in <http://algo2.iti.uni-karlsruhe.de/dementiev/stxxl/doxy/html/installation_msvc.html> ?
Then the libstxxl.lib and the stxxl headers paths will be included into your MSVC project.
also see the test WinGUI application in stxxl/test/WinGUI directory
The correct way to include stxxl is (for versions 1.0x):
Thank you for your quick respond! Really appreciate it.
I need to add the parameters from 'compiler.options' and 'linker.options' (I thought it was optional. Actually when Stxxl project was successfully built VC++ 8.0 prompt the same parameters to be used in other projects.)
I can now build the test programs but still some problem to run them.
When running the test programs it prompts: Error in config::config No disks found in './.stxxl' .
I have created a disk file 'stxxl' (3000 Mb) under disk D used the provided tool 'createdisks.exe'. My config file called '.stxxl' and the option is "disk=d:\stxxl,3000,wincall" without quote.
BTW, can you show me how to set the enviroment variable STXXLCFG so that I can use other config file name other than '.stxxl'. Because file names begin with '.' is not allowed by Windows (although we can force it to create them), I doubt if the name '.stxxl' is valid in WinXP.
.stxxl file works perfectly on my winXP system with NTFS (may be there might be problems with FAT32)
regarding environment variables try to use google:
or just type in command line:
set STXXLCFG=full_path_to_your_stxxl_config <enter>
OK. Finally make it work:)
In the config file ".stxxl" I put a space before "disk=d:\stxxl,3000,wincall" and that's it. Dont know why but it just work.
Thanks a lot for all the helps.