User forums > Nightly builds
The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
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:
--- Code: ---#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();
}
--- End code ---
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
--- End quote ---
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 ?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version