What's a real shame is that the document that explains its development is written only in Spanish. Well, you can always learn a new language, so it shouldn't be a problem either :wink:
I've been thinking that maybe, just maybe, I should publish the code of my preprocessor. Questions are: where should I upload it (CB's svn respository, code.google.com, just a zip file somewhere, ...), and, most importantly, is it really going to be used?
I doubt it's going to be used right away in its current state. Chances are some modifications will be needed and some extra information saved during the process. Perhaps some more optimizations may be required, but it would be, at least, a starting point.
What's a real shame is that the document that explains its development is written only in Spanish. Well, you can always learn a new language, so it shouldn't be a problem either :wink:
CVAPI(void*) cvAlloc( size_t size );
#ifndef CVAPI
#define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
#endif
CV_EXTERN_C CV_EXPORTS void * CV_CDECL cvAlloc ( size_t size ) ;
I have started to upload files already. Right now I have only uploaded all documentation files (or the like) I found. I hope to have the source code ready this afternoon (UTC+1), which will be uploaded to the same place.Great! I'm happily reading the CCP document. It's a new string type. Hopefully I can do some help to improve the plugin.
URL: http://sites.google.com/site/ceniza666/ccpp
fsp.addLocalSearchPath(defaultStringType("D:/MinGW/lib/gcc/mingw32/4.3.2/include/c++"));
D:/MinGW/lib/gcc/mingw32/4.3.2/include/c++/iostream:44: 'bits/c++config.h' not f
ound
Process returned 1 (0x1) execution time : 0.015 s
Press any key to continue.
fsp.addLocalSearchPath(defaultStringType("D:/MinGW/lib/gcc/mingw32/4.3.2/include/c++/bits"));
...
#ifndef _GLIBCXX_IOSTREAM
#define _GLIBCXX_IOSTREAM 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <ostream>
#include <istream>
...
#include<cv.h>
#include<cxcore.h>
#include<highgui.h>
using namespace std;
int main() {
double a[5][5]={
0,4,6,9,0,
-5,2,0,1,2,
-2,0,1,6,7,
-6,1,1,1,1,
-1,2,3,0,4
};
CvMat ma=cvMat(5,5,CV_64FC1,a);
CvMat* m=cvCreateMat(5,5,CV_64FC1);
m=cvCloneMat(&ma);
CvMat *mb=cvCreateMat(5,5,CV_8UC1);
cvCmpS(m,0,mb,CV_CMP_LT );
return 0;
}
fsp.addLocalSearchPath(defaultStringType("D:/MinGW/lib/gcc/mingw32/4.3.2/include/c++"));
fsp.addLocalSearchPath(defaultStringType("D:/MinGW/lib/gcc/mingw32/4.3.2/include/c++/bits"));
fsp.addLocalSearchPath(defaultStringType("F:/opencv/include/opencv"));
fsp.addLocalSearchPath(defaultStringType("D:/MinGW/include"));
fsp.addLocalSearchPath(defaultStringType("D:/MinGW/lib/gcc/mingw32/4.3.2/include"));
src/test/../../tests/pptest05.cpp:19: #endif expected
Process returned 1 (0x1) execution time : 0.359 s
Press any key to continue.
include <endian.h> insteadBut I don't want to change the standard header file supplied by mingw. endian.h was include in <iostream> :D.
Quoteinclude <endian.h> insteadBut I don't want to change the standard header file supplied by mingw. endian.h was include in <iostream> :D.
Your code contains too many templates. It's a bit hard for me to read :D.
template <class StringType, class StringFunctions>
typename CCPFSourceProvider<StringType, StringFunctions>::DataFetcherType CCPFSourceProvider<StringType, StringFunctions>::getSource(const StringType &filename, const StringType &source, bool global, unsigned int start) throw (ccp::FileNotFound<StringType>)
{
unsigned int found_at = start;
if (global)
{
typename stringVectorType::const_iterator i = m_globalPaths.begin();
if (start >= m_globalPaths.size())
{
i = m_globalPaths.end();
}
else
{
std::advance(i, start);
}
for (; i != m_globalPaths.end(); ++i, ++found_at)
{
StringType path(*i);
if (path.length() > 0 && path[path.length() - 1] != StringFunctions::dirSeparator)
{
path += StringFunctions::dirSeparator;
}
path += filename;
if (StringFunctions::fileExists(path))
{
return DataFetcherType(IFStreamFileAbstr<StringType>(path), path, true, found_at);
}
}
start = found_at = 0;
}
wxString Parser::GetFullFileName(const wxString& src,const wxString& tgt, bool isGlobal)
{
wxCriticalSectionLocker lock(s_mutexListProtection);
wxString fullname(_T("")); // Initialize with Empty String
if (isGlobal)
{
fullname = FindFirstFileInIncludeDirs(tgt);
if (fullname.IsEmpty())
{
// not found; check this case:
//
// we had entered the previous file like this: #include <gl/gl.h>
// and it now does this: #include "glext.h"
// glext.h was correctly not found above but we can now search
// for gl/glext.h.
// if we still not find it, it's not there. A compilation error
// is imminent (well, almost - I guess the compiler knows a little better ;).
wxString base = wxFileName(src).GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
fullname = FindFirstFileInIncludeDirs(base + tgt);
}
}
......
I just installed CodeLite and test it's parser. But, I found that it's parser doesn't work as well as codeblocks'. :( Especially it can't automatically parser the header file, and many bugs.
I'm using codelite because I found that code completion was better than C::B...
#include <stdio.h>
int abcdefg;
int main(int argc, char **argv)
{
printf("hello world\n");
abcd*******************Here
return 0;
}