Moonkis wrote:Clang fail code (FULL)
CODE: SELECT ALL
class Foo
{
public:
void integerPrint(int i)
{
std::cout << i << std::endl;
}
void print(int i)
{
integerPrint(i); /* Clang-error but works. */
}
};
int main(int argc, char **argv)
{
Foo foo;
foo.print(100);
return 0;
}
OK, I see what you mean now. If I only type the "(" I get an error from clang. However, if you cancel it (hit ESCAPE) and then hit Ctrl-Shift-SPACE (which is the shortcut for triggering the function tooltip) it works
Another case that works:
type: integer // Hit Ctrl-SPACE and accept the completion
it will also work
This seems like a glitch in clang. In anycase, I strongly recommend to use clang in addition to the built-in parser (the built-in parser will work in 99% of the cases) codelite will only use clang when it fails to parse something using the builtin parser
Read this for more details
Moonkis wrote:Building but failing output
C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f "OneGameAMonth_wsp.mk""
"----------Building project:[ Random_Dungeon_Generation - Debug ]----------"
mingw32-make.exe[1]: Entering directory `C:/Program Files (x86)/CodeLite/OneGameAMonth/Random_Dungeon_Generation'
codelitegcc g++ -c "C:/Program Files (x86)/CodeLite/OneGameAMonth/Random_Dungeon_Generation/main.cpp" -g -O0 -Wall -o ./Debug/main.o -I. -I.
C:/Program Files (x86)/CodeLite/OneGameAMonth/Random_Dungeon_Generation/main.cpp:239:1: error: expected ';' after class definition
mingw32-make.exe[1]: *** [Debug/main.o] Error 1
Random_Dungeon_Generation.mk:95: recipe for target `Debug/main.o' failed
mingw32-make.exe[1]: Leaving directory `C:/Program Files (x86)/CodeLite/OneGameAMonth/Random_Dungeon_Generation'
mingw32-make.exe: *** [All] Error 2
OneGameAMonth_wsp.mk:4: recipe for target `All' failed
0 errors, 0 warnings
This happens because you placed your sources in a folder with a weird characters ("Program Files (x86)")
Move your sources elsewhere to location without spaces non standard characters in the path and it will work.
Alternatively, you can fix the parsing regex. You will encounter other errors if you insist on placing the sources there (not only from codelite, for example, the windres.exe utility (windows resource compiler) will also break compiling such sources)
Moonkis wrote:Ah! I'm coming from Visual Studio and C::B and never encountered this before, good to know!
You should know that codelite is not a compiler and its gcc which generates these errors/warnings. If you did not get them under C::B it means that you either used VC or used different warning level
Moonkis wrote:How do I cycle through the suggested parameterlist of a function?
Like:
a(int i);
a(char i);
Use the UP/DOWN arrows
Moonkis wrote:And is there a way to get class member variables to be highlighted inside the function definition in an .cpp file?
Try: Settings -> Tags Settings -> General -> Colouring -> Colour workspace tags
and check the option:
"member"
Note that codelite has limitation for 2 colours only: 1 is allocated for local variables and the second is for the rest (the list of checkboxes on that page)
You can change the font, colour style etc from: Settings -> Syntax highlight and Fonts -> C++ -> Customize -> Local Variables ( or Workspace Tags )
Eran