News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.

Started by killerbot, September 19, 2010, 09:23:36 AM

Previous topic - Next topic

helpse

I can not open header files located in the same directory where my cpp file is. It gives me "not found" error when i use "open #include file" function. I think it's, as Loaden said, NONE project parser error. I tried to apply the patch but my SVN gives me this error: "The patch seems outdated! i tried updating the SVN project to 6620 and to 6608, and its still giving me this error when i try to apply the patch. What can i do to be able to apply the patch ?

Jenna

Quote from: helpse on September 21, 2010, 05:07:46 PM
I can not open header files located in the same directory where my cpp file is. It gives me "not found" error when i use "open #include file" function. I think it's, as Loaden said, NONE project parser error. I tried to apply the patch but my SVN gives me this error: "The patch seems outdated! i tried updating the SVN project to 6620 and to 6608, and its still giving me this error when i try to apply the patch. What can i do to be able to apply the patch ?
I can not reproduce.

Can you give a sample project, where the issue occurs ?
And please post the exact version number, OS, wxWidgets, compiler version ...

helpse

Sample code:

#include <iostream>
#include "console"
using namespace std;
using namespace console;

int main()
{
    cout << "Hello!" ;
    return 0;
}


console is a header file located in the same directory. It compiles and runs OK. The error ocurres when i right click on "console" and click on "open #include file". I get "Not found" error. The weird thing is that it happens 99% of the times, sometimes it works. It was happenning in the official release of CB 10.05, the one downloaded from the official page, so i downloaded this CC branch, http://prdownload.berlios.de/codeblocks/wxmsw28u_gcc_cb_wx2810_gcc441.7z and i still have the same problem. I'm using Windows 7 Ultimate, i'm trying to compile wxWidgets 2.9.1, and im using gcc 4.5.0, the one downloaded from the main page.

Loaden

Quote from: helpse on September 21, 2010, 05:07:46 PM
I can not open header files located in the same directory where my cpp file is. It gives me "not found" error when i use "open #include file" function. I think it's, as Loaden said, NONE project parser error. I tried to apply the patch but my SVN gives me this error: "The patch seems outdated! i tried updating the SVN project to 6620 and to 6608, and its still giving me this error when i try to apply the patch. What can i do to be able to apply the patch ?
Could you trying CC BRANCH SVN 6621?
It shoud be fixed.

ollydbg

Quote from: helpse on September 22, 2010, 12:13:09 AM
Sample code:

#include <iostream>
#include "console"
using namespace std;
using namespace console;

int main()
{
    cout << "Hello!" ;
    return 0;
}


console is a header file located in the same directory.

I just test your example, and works fine here( ccbranch 6621, windowsXP)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Loaden

Quote from: helpse on September 22, 2010, 12:13:09 AM
Sample code:

#include <iostream>
#include "console"
using namespace std;
using namespace console;

int main()
{
    cout << "Hello!" ;
    return 0;
}


console is a header file located in the same directory. It compiles and runs OK. The error ocurres when i right click on "console" and click on "open #include file". I get "Not found" error. The weird thing is that it happens 99% of the times, sometimes it works. It was happenning in the official release of CB 10.05, the one downloaded from the official page, so i downloaded this CC branch, http://prdownload.berlios.de/codeblocks/wxmsw28u_gcc_cb_wx2810_gcc441.7z and i still have the same problem. I'm using Windows 7 Ultimate, i'm trying to compile wxWidgets 2.9.1, and im using gcc 4.5.0, the one downloaded from the main page.
Fixed, thanks!

helpse

Thank you, i think u looked into the error and fixed it. May be some of u can compile CC Branch SVN 6621 for those who, like me, are having troubles trying to install wxwidget to work with CB project. Can any1 compile and upload it? I wanna test to see if the code works for me too.

Loaden

Quote from: helpse on September 22, 2010, 03:50:09 AM
Thank you, i think u looked into the error and fixed it. May be some of u can compile CC Branch SVN 6621 for those who, like me, are having troubles trying to install wxwidget to work with CB project. Can any1 compile and upload it? I wanna test to see if the code works for me too.
Please trying and  feedback me.
Thanks!

http://portablecb.googlecode.com/files/CB_CCBRANCH_6621_patched.7z

helpse

Quote from: Loaden on September 22, 2010, 04:02:12 AM
Quote from: helpse on September 22, 2010, 03:50:09 AM
Thank you, i think u looked into the error and fixed it. May be some of u can compile CC Branch SVN 6621 for those who, like me, are having troubles trying to install wxwidget to work with CB project. Can any1 compile and upload it? I wanna test to see if the code works for me too.
Please trying and  feedback me.
Thanks!

http://portablecb.googlecode.com/files/CB_CCBRANCH_6621_patched.7z
Thank you Loaden and all the guys who supported. Now this problem is fixed ;)

Loaden

Fix a hangs when reparse.

2010-09-22 19:31:53 Sorry, this patch can not let's the hangs gone. So, I deleted this patch, and will look into it.

2010-09-22 21:15:53 fixed, re-upload patch.

helpse

Found a new bug. Single files which dont belong to a project dont get to compile cause they arent getting linked to the libraries setted up in Settings -> Compiler & Settings -> Linker Settings. They only compile when they are inside a project.

Code Sample:


#define UNICODE
#include "..\cGui.h"
using namespace std;

class cMainForm
{
void Button_Clicked()
{
AlertUser( TEXT( "Button was clicked" ) );
}

    cWindow < cMainForm > Window;
cButton < cMainForm > Button;

    public:

cMainForm() : Window   ( *this   ),
  Button   ( Window  )
{
Button.OnClicked = &cMainForm::Button_Clicked;

Window.SetName( TEXT( "Window" ) );
Window.DisableMaximize();
Window.DisableSizing();

int W = 200, H = 200;
Window.SetInnerSize( W, H );

int CenterX = W / 2;
int CenterY = H / 2;

Button.SetName( TEXT( "♠♣♥♦Button" ) );
Button.SetPos( CenterX - Button.GetWidth() / 2, CenterY - Button.GetHeight() / 2 );

int ScreenWidth = GetSystemMetrics( SM_CXSCREEN );
int ScreenHeight = GetSystemMetrics( SM_CYSCREEN );

Window.SetPos( ( ScreenWidth - W ) / 2, ( ScreenHeight - H ) / 2 );

Window.Show();
    }
};

int main()
{
cMainForm MainForm;
return App.Run();
}


If u save it as a single file "Button_example.cpp" it wont compile, but if u create a project and u put that code in main.cpp, it compiles ok.

Linked libraries it uses: libcomctl32.a, libgdi32.a (They are setted up in Settings -> Compiler & Settings -> Linker Settings)

Im using the CC SVN 6621, and gcc 4.5.0.

Please, if u get to patch it, compile it for me so i can dl the compiled version. I couldnt configure wxwidgets yet, have been all day trying to solve compiler/IDE issues.

Thanks.

Loaden

This is not CC issue. :)
B.T.W Works well for compile a single file for me.

helpse

A single file which uses libraries linked in Settings -> Compiler & Settings -> Linker Settings compiles ok? In my build it doesnt! May be u compiled a single file which "doesnt need libraries" such the ones i mentioned above. That code doesnt compile when its not inside a project, but the compiles if i create a project and put the code inside! The same code, works when its inside a project and doesnt work if i compile it as a single file... seems to be a bug :S

Jenna

Quote from: helpse on September 22, 2010, 11:17:51 AM
A single file which uses libraries linked in Settings -> Compiler & Settings -> Linker Settings compiles ok? In my build it doesnt! May be u compiled a single file which "doesnt need libraries" such the ones i mentioned above. That code doesnt compile when its not inside a project, but the compiles if i create a project and put the code inside! The same code, works when its inside a project and doesnt work if i compile it as a single file... seems to be a bug :S
Are you aware that C::B compiles a single file with the compiler set as default compiler ?.
I just tested on trunk and it works fine here.

helpse

Im not touching compiler or linker settings. They are setted to default compiler, and in the linker options i have comctl32 and gdi32. A single code, which uses some of these libraries, cant compile. But this SAME CODE compiles when i put it into a project, which has SAME settings. Weird, isnt it ?