Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bytenugget

Pages: [1]
1
I hate it when this happens...

In the quest to analyze the different build results further, I recompiled in Debug and shared libraries again "today". And now it's working. I have no idea why.
Yes, I have been doing some code changes here and there, but nothing major. And I was doing test builds all the time, in the "previous days".
(something, something, build cache?) I was clearing the build cache multiple times, when this issue first came to notice.

Okay whatever, I guess(?)...

But the Release type builds are still messed up. I would like to find a solution to that. But now I can atleast keep working on this and not have to ditch everything. *sigh* linux development (and c++) is such a struggle...

I changed the statistics output on the console a bit. (previous output made no sense)
Time Profile 'TestForm':
Cycle:  0.00001
Window: 0.00001
Update: 0.00000
Draw:   0.00000
FPS: 142857.14062
Objects: 0, Updatables: 0, Drawables: 0
 
(output of a Release type build)

This now shows a very interesting detail. Either me setting the framelimit to 60 is completely ignored. Or there is something else going wrong. (setFramelimit() is called inside cf::Form::Open() after creating the window.

So right now it comes down to:
TestForm::Init() override from main.cpp is ignored.
and the window update rate is wrong.

2
I am linking the executable to X11 explicitly.
target_link_libraries(test sfml-graphics X11)

However: I don't know how to work with the window handle. So I removed my calls to xlib but the issue is still the same.

I thought I sort of figured it out, but I feel like I am (still) making mistakes with type inheritance and constructors. I do not fully understand how this works in c++.

3
Hi there!

I started a small personal use project on linux in c++ for a UI framework utilizing SFML 2.6.2.

I'm in very early stages right now. Just finished programming the first runable main structure of the project.
My main programming experience comes from c# and I just started focusing on c++ deeply a few months ago. I might be doing a pretty easy to solve mistake here, idk.

My test application is supposed to create a window and create a few objects inside that will move around. And the execution times are plotted to console. (See Attachment 1)

If I compile the project using static libraries and Debug as target, everything works as it is supposed to.
But if I instead chose to build with shared libraries or Release as target, my window stays empty and the inside objects do not get created. (See Attachment 2)
The desired name of the custom window is correct. but the window size and everything else is not.

I have uploaded the complete project into a github repository here:
https://github.com/bytenugget/cforms/blob/master/source/Test/main.cpp

It shouldn't be too scary to go and have a look at that, if you need to. It is very simple stuff right now. And there are a lot of comments to describe the use of custom types and functions.
The main code base is inside the "include" folder. This base code seems to be working just fine in each build. But not the code inside the main.cpp of the test application.

In the code of the test application I created 2 new types, which are derived from base types, which are defined in my framework.  A build with shared libraries or Release target seems to ignore pretty much everything I wrote in these 2 new types. Everything but the name.

[EDIT]: I feel like I might be doing mistakes with type inheritance and constructors.

Pages: [1]