User forums > Using Code::Blocks
Where are the standard libraries?!(and other questions)
kingcools:
Hello, im starting to believe i didnt build codeblocks properly(running windows vista btw):
I installed this version of codeblocks "http://sourceforge.net/projects/codeblocks/files/Binaries/10.05/Windows/codeblocks-10.05mingw-setup.exe/download", but somewhat it lacks many standard libraries(right now im missing fstream.h and vector.h).
what do i have to do to build codeblocks properly?
thank you :)
stahta01:
Your question does NOT make sense to me.
My standard request below:
Turn on Full Compiler Logging and see if the build log has any problems/information.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Tim S.
oBFusCATed:
Then next standard answer: migrate to c++ of today, c++98/03/0x, not the one used in the nighties (before 98)...
Also search your harddrive for the files, to see if they can be found anywhere on it (especially in your compilers subdirectories).
kingcools:
i already searched my hard drive for these files and found them, but when I use them the compiler gives out alot(!) of errors concerning these files.
The MinGW include folder does not contain most of the standard libraries(it does have stdio.h though)
as far as i know c++0x isnt even finished yet and this would be a work around and not a solution to my problem.
Here is a part of the code im working on:
--- Code: ---#ifndef PALETTE_H
#define PALETTE_H
#include <fstream>
#include <vector>
#include "D:\Programmieren\CodeBlocks\Projekte\Sffdatei\Sff2allegro\sff2_structs.h"
class palette
{
public:
palette(ifstream& filepointer,sff2header head);
palheader palhead;
bool error;
bool loaded;
private:
vector<RGB> data;
void load(ifstream&,palheader,unsigned int);
};
#endif // PALETTE_H
--- End code ---
here the build log:
--- Code: ---D:\Programmieren\CodeBlocks\Projekte\Sff_test\include\palette.h:20: error: 'ifstream' has not been declared
D:\Programmieren\CodeBlocks\Projekte\Sff_test\src\palette.cpp:3: error: expected ')' before '&' token
D:\Programmieren\CodeBlocks\Projekte\Sff_test\src\palette.cpp:16: error: variable or field 'load' declared void
D:\Programmieren\CodeBlocks\Projekte\Sff_test\src\palette.cpp:16: error: 'ifstream' was not declared in this scope
D:\Programmieren\CodeBlocks\Projekte\Sff_test\src\palette.cpp:16: error: 'filepointer' was not declared in this scope
D:\Programmieren\CodeBlocks\Projekte\Sff_test\src\palette.cpp:16: error: expected primary-expression before 'palhead'
D:\Programmieren\CodeBlocks\Projekte\Sff_test\src\palette.cpp:16: error: expected primary-expression before 'unsigned'
--- End code ---
I checked the include folder and it DOES NOT contain fstream.h or vector.h.
I tried using a different one but then i get even more errors.
Jenna:
--- Quote from: kingcools on March 16, 2011, 11:58:20 am ---I checked the include folder and it DOES NOT contain fstream.h or vector.h.
--- End quote ---
That's because they are named fstream and vector without the extension !!
Your problem is not C::B related, not even compiler related, it's just a simple programming error:
either add "using namespace std;" or use "std::ifstream" etc.
Navigation
[0] Message Index
[#] Next page
Go to full version