Dmitrii S5020

Member since: Monday, 13 April 2015
Last login: 6 years ago
Profile viewed: 755 views

Your Rank: 67
Points: 27

Dmitrii S5020 replied to the topic 'C++Builder: Cannot debug 64 bit app' in the forum. 7 years ago

Hi Mats

Thanks for your response. Though it did not give me much information, but it nudged me to conduct more tests. :)

After some trials I've found out that the problem was caused by my antivirus. When I disabled it (or then set up some exceptions), debugger started to work as expected for all my examples.

The thing, which confused me is that this problem did not take place for apps created by 32 bit compiler...

Anyway thanks for your willing to help, and maybe this topic will be useful for someone else.
Read More...

Dmitrii S5020 thanks user 'Mats W' in the forum message ' C++Builder: Cannot debug 64 bit app'. 7 years ago
Dmitrii S5020 created a new topic ' C++Builder: How to navigate to method body' in the forum. 7 years ago

Hello,

I'm warning with C++Builder XE6 and XE8.

I know that it is possible to use Ctrl + Click to navigate to method or function declaration (or declaration of other objects). But I wonder it is possible to navigate somehow to the method definition (i.e. to method body)?

Also I wonder if there is some keyboard hot key with the same effect as "Ctrl + Click".

Thanks in advance.
Read More...

Dmitrii S5020 created a new topic ' C++Builder: Warning in header' in the forum. 7 years ago

Hello,

I have the following problem:

I used to follow the guidelines and do my best not to have warnings during compilation (by fixing the code, not by disabling warnings).

Also I use `std::unique_ptr<>`.

But it turned out that implementation of std::unique_ptr has a bug (at least it triggers warning on 32 bit platform in release mode and when I look at implementation it seems, that it is not hundred percent correct).

The specifics. I try to build the following code with 32 bit compiler in release configuration

#include <memory>
using namespace std;

int main()
{
unique_ptr<int> myUniqueInt;
int * myInt = new int(5);
myUniqueInt = unique_ptr<int>(move(myInt));
return 0;
}

Then I get the warning: [bcc32 Warning] memory(806): W8070 Function should return a value

Now if I look to the source of the warning, I see the following (file "memory", line 798, from standard library):

_Myt& operator=(_Myt&& _Right)
{ // assign by moving _Right
if (this != &_Right)
{ // different, do the move
reset(_Right.release());
this->get_deleter() = _STD move(_Right.get_deleter());
return (*this);
}
}

We can see, that indeed if `this == &_Right`, then function does not return any value, so the warning is right.

The questions I have are following:
1. Why the warning is not triggered in the Debug configuration - it is only triggered in release?
2. How can I overcome this without giving up "treat warnings as errors" globally and without disabling this warning globally.

Thanks in advance.
Read More...

Dmitrii S5020 created a new topic ' C++Builder: Cannot debug 64 bit app' in the forum. 7 years ago

Hello,

I'm trying to check out 64 bit C++ compiler (as it is Clang based, I hope it will better conform to the standard). But the problem is that I cannot debug anything: breakpoints just does not work.

I do the following:
-> Create new project
-> Save all files with some names
-> Replace the whole content of the cpp file with classic "hello world" source like this:

#include <iostream>
#include <ostream>

using namespace std;

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

-> Right-click "Target Platforms" and create 64 bit platform. Make it active.
-> Build the debug configuration. In output window I see that Clang based compiler is used.
-> Set break point at "return" statement.
-> Start debugging (e.g. with F9)

Result:
The application runs OK, but breakpoints are shown crossed (as if no debug information is available) and they are not triggered, so application exits immediately.

The documentation says, that debugging should work basically the same as for 32 bit compiler, but for some reason it does not. I'd highly appreciate if someone could tell me what may be the reason.

Notes:
1. Debugging for 32 bit platform works just fine for me.
2. I tried 64 bit debugging on two versions: XE6 and XE8 - the behavior is the same for both versions.

Thanks in advance.
Read More...

Dmitrii S5020 replied to the topic 'C++Builder: Premature Post-Build event execution' in the forum. 7 years ago

Hi Sarina,

Thanks for your answer. But probably I explained the problem not clear enough...

Of course, I don't duplicate post-build event in the local options of specific file. I only need it to be done after the whole build process is finished.

The problem is that the post-build event (if it exists) is duplicated automatically in the local properties of the file, when we create those local properties. And I don't know how to remove/disable it then.

Consider the following workflow:

1. Create C++ project with several source files (aka units).
2. Create global post-build event (all configurations, all platforms), which does something like

copy $(OUTPUTPATH) C:\some_other_dir

3. Right-click some source file (unit) -> "Edit local options". Let's call it "MySpecialSource.cpp"
4. Change some local options (in my case I disable some specific warning).
5. Save everything.
6. Try to compile.

=> I'd expect that it will fail on first run. And if you examine output, you'll see, that after MySpecialSource.cpp is compiled the post-build event is executed. But output executable (or dll) is not linked yet, so there is nothing to copy, which triggers the error).


To make things more obvious you may replace "copy" command with "echo". Something like "echo This is post-build event". And then check the output of the build (in the "Output" tab of "Messages" window). You'll see, that post-build event is triggered twice: once after compilation of "MySpecialSource.cpp" and second time after the build is completed.


Below you can find the output of the build of sample project created as described above. You can see, that "echo Hi there" is called twice: first time after "Unit1.cpp" is compiled and the second time after the build is completed.

So, the question is how to disable first occasion, while keeping local options of the file.

The build output:





Build started 30.04.2015 08:10:12.
__________________________________________________
Project "C:\Users\dsemikin\Documents\Embarcadero\Studio\Projects\TestPostBuildEvents\Project1.cbproj" (Make target(s)):
Target MakeObjs:
Target _CppDepCheck:
Modified: File1.cpp;Unit1.cpp
Target CppCompile:
Target _CppCoreCompile:
Target _BCC32CoreCompile:
c:\program files (x86)\embarcadero\studio\14.0\bin\bcc32.exe -D_DEBUG -n.\Win32\Debug -ITestPostBuildEvents;"C:\Program Files (x86)\Embarcadero\Studio\14.0\include\boost_1_39\boost\tr1\tr1";"C:\Program Files (x86)\Embarcadero\Studio\14.0\include\boost_1_39";"c:\program files (x86)\embarcadero\studio\14.0\include";"c:\program files (x86)\embarcadero\studio\14.0\include\dinkumware";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\crtl";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\sdk";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\rtl";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\vcl";"C:\Program Files (x86)\Raize\CS5\Lib\RS-XE6\Win32" -y -Q -k -r- -c -tC -C8 -o.\Win32\Debug\File1.obj -w-par -Od -v -vi- -H=.\Win32\Debug\Project1.pch -H File1.cpp
Build started 30.04.2015 08:10:13.
Target _BCC32CoreCompile:
__________________________________________________
Project "C:\Users\dsemikin\Documents\Embarcadero\Studio\Projects\TestPostBuildEvents\Project1.cbproj" is building "C:\Users\dsemikin\Documents\Embarcadero\Studio\Projects\TestPostBuildEvents\Project1.cbproj" (MakeOne target(s)):
Target _MakeOne:
Target _CppCoreCompile:
Target _BCC32CoreCompile:
c:\program files (x86)\embarcadero\studio\14.0\bin\bcc32.exe -D_DEBUG -n.\Win32\Debug -ITestPostBuildEvents;"C:\Program Files (x86)\Embarcadero\Studio\14.0\include\boost_1_39\boost\tr1\tr1";"C:\Program Files (x86)\Embarcadero\Studio\14.0\include\boost_1_39";"c:\program files (x86)\embarcadero\studio\14.0\include";"c:\program files (x86)\embarcadero\studio\14.0\include\dinkumware";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\crtl";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\sdk";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\rtl";"c:\program files (x86)\embarcadero\studio\14.0\include\windows\vcl";"C:\Program Files (x86)\Raize\CS5\Lib\RS-XE6\Win32" -y -Q -k -r- -c -tC -C8 -o.\Win32\Debug\Unit1.obj -w-par -Od -v -vi- -H=.\Win32\Debug\Project1.pch -H Unit1.cpp
Target PostBuildEvent:
echo Hi there
Hi there
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.27
Target RcCompile:
Target BuildVersionResource:
c:\program files (x86)\embarcadero\studio\14.0\bin\cgrc.exe -c65001 Project1.vrc -foProject1.res
CodeGear Resource Compiler/Binder
Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc.

Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

Copyright (C) Microsoft Corporation. All rights reserved.


Deleting file "Project1.vrc".
Target _PerformLink:
Target _PerformBCCILink:
c:\program files (x86)\embarcadero\studio\14.0\bin\ilink32.exe -G8 -L.\Win32\Debug;"c:\program files (x86)\embarcadero\studio\14.0\lib\Win32\debug";TestPostBuildEvents;"c:\program files (x86)\embarcadero\studio\14.0\lib\win32\release";"c:\program files (x86)\embarcadero\studio\14.0\lib\win32\release\psdk";"C:\Program Files (x86)\Raize\CS5\Lib\RS-XE6\Win32";C:\Users\Public\Documents\Embarcadero\Studio\14.0\DCP -j.\Win32\Debug;"c:\program files (x86)\embarcadero\studio\14.0\lib\Win32\debug";TestPostBuildEvents;"c:\program files (x86)\embarcadero\studio\14.0\lib\win32\release";"c:\program files (x86)\embarcadero\studio\14.0\lib\win32\release\psdk";"C:\Program Files (x86)\Raize\CS5\Lib\RS-XE6\Win32";C:\Users\Public\Documents\Embarcadero\Studio\14.0\DCP -l.\Win32\Debug -v -Tpe c0x32 .\Win32\Debug\File1.obj .\Win32\Debug\Unit1.obj , .\Win32\Debug\Project1.exe , .\Win32\Debug\Project1.map , import32.lib cw32.lib , , Project1.res
Target PostBuildEvent:
echo Hi there
Hi there
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.23
Read More...

Dmitrii S5020 replied to the topic 'C++Builder: Premature Post-Build event execution' in the forum. 7 years ago

I've updated the question with new information, so, please, consider answering it, if you know the answer.

Thanks.
Read More...

Dmitrii S5020 created a new topic ' C++Builder: Not all files compiled on first "make"' in the forum. 7 years ago

Hi,

I use C++Builder XE6.

And I've got strange behavior: if I do "Clean" and then "Make" or "Build" with my project, then on first run build process is stopped before all the files are compiled and linked. If I run "Make" once again, then several more files are compiled and the executable is linked.

I would highly appreciate if some one can give any idea, what may be the reason of such strange behavior.

Thanks in advance.
Read More...

Dmitrii S5020 replied to the topic 'C++Builder: How to rename VCL Form?' in the forum. 7 years ago

Thanks... Indeed. How did I missed it?...
Read More...

Dmitrii S5020 thanks user 'Luis N' in the forum message ' C++Builder: How to rename VCL Form?'. 7 years ago
Dmitrii S5020 created a new topic ' C++Builder: How to rename VCL Form?' in the forum. 7 years ago

Hello,

I'm new to C++Builder and I use C++Builder XE6.

I tried to create some VCL Forms application. When I just created it the "Form1" window was created.

Then I was looking for how I can change the name of the control itself, i.e. how to change the name, which is used to refer to the form in the source code. And I did not find how to do this.

Could someone explain me how it can be done or give some link to the documentation, where it is described.

Thanks in advance.
Read More...

Dmitrii S5020 replied to the topic 'How to combine C++ header and source into unit?' in the forum. 7 years ago

Hello, J T.

Thanks for your answer. Indeed this works. Additional note: the casing of guard macro is not important, i.e. one can use either "testH" or "TESTH" or "testh" in the example above (but no underscores etc.)

Though, the hole thing is not very good for me, because I have some source base, which I have to adapt to C++Builder and this source base has different convention for naming guards. So I either have to change the guard names for all header files or to give up the idea of using units (and use separate header and source files included to the project, which is not too convenient as I cannot switch between them easily).

After all, I don't understand, why guard name influence if the header is detected as part of the unit? Guard name is the only property of the header itself and does not connect it to the source file in any way. So, why not just check the file name of the header? Or why not to make it possible to set up the unit manually? But probably I miss some point.

Anyway, thanks again for the answer. At least now I know why it did not work for me from the very beginning.
Read More...

Dmitrii S5020 thanks user 'J T' in the forum message ' How to combine C++ header and source into unit?'. 7 years ago
Dmitrii S5020 created a new topic ' How to combine C++ header and source into unit?' in the forum. 7 years ago

Hello,

I'm new to C++Builder and I'm working with C++Builder XE6.

Could anyone explain me (or give a link to some resource), how to combine existing C++ source and header files into "unit", so that e.g. I can use "CTRL + F6" to switch between them) when the files are already exist?

Thanks in advance.
Read More...

Dmitrii S5020 thanks user 'Marco C' in the forum message ' left arrow key - move to previous line'. 7 years ago
Dmitrii S5020 replied to the topic 'left arrow key - move to previous line' in the forum. 7 years ago

Hello, Marco,

Thanks for your reply. I'd prefer the setting exist, but at least I will not spend time for searching it any more and will try to get used to existing behavior.

I don't know how representative am I, but IMHO adding such setting would be a nice thing for new users, who come from other text editors and IDEs, as the behavior of C++Builder is non-standard (I've never seen it before, though I used lots of editors in my life).

Thanks once again for the answer. Best regards.
Read More...

Dmitrii S5020 created a new topic ' left arrow key - move to previous line' in the forum. 7 years ago

Hello,

I'm new to C++Builder. Have to work with C++Builder XE6.

The first peculiarity I've faced is that when if I press left arrow key multiple time then cursor goes to the beginning of the line and tops there. I wonder if it is possible to configure it so, that it goes to previous line?

Also I would prefer the cursor to go to the next line, when it reaches end of line.

Unfortunately, official documentation and Google did not help (and I wans not able to find this settings by myself).

Thanks in advance.
Read More...

Dmitrii S5020 created a new topic ' Where to report problems of community site?' in the forum. 7 years ago

Hello,

For some reason I cannot post a question in "Answers" section of this site (community embarcadero com). "Submit" button just work (IE11 or FF on win7 desktop).

Also did not find, where to report the problem:
* This forum does not have relevant topic.
* "quality central" site does not have relevant topic
* new "quality" site does not have any topics at all
* old forums also does not have relevant topic...

Please, tell me, where should I report this kind of problems? Thanks.
Read More...

DavidI is friends with Dmitrii S5020