Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImWindow not buildable on Linux #10

Open
ebachard opened this issue May 1, 2017 · 7 comments
Open

ImWindow not buildable on Linux #10

ebachard opened this issue May 1, 2017 · 7 comments

Comments

@ebachard
Copy link

ebachard commented May 1, 2017

First over all, thanks a lot for sharing your code : this is a great idea, and an extremely interesting feature.

Since we have everything available, of course, we can write a Makefile or something similar, but simple instructions could help a lot. And the first thing coming to my mind, is : how to use genie on Linux ?

Would you mind to you confirm something is missing (or maybe I'm plain wrong ? :-)

@ebachard
Copy link
Author

ebachard commented May 1, 2017

Attached

  1. one uggly made in 15 min makefile named "Makefile-Linux". This file must be located in the root dir

Build :
make -f Makefile-Linux
Create a .tar.gz archive:
make -f Makefile-Linux devel
Cleanup:
make -f Makefile-Linux clean

  1. a diff, because the build was broken (sprintf_s is Windows only)

See : http://stackoverflow.com/questions/4096709/sprint-f-macro-in-linux-for-cross-platform-application

for the fix I used + the second breakage, because of a typo in the header name (OMG Windows tools still does not see that ? )

Now, we can test on Linux. thanks in advance for a better fix about sprintf_s, because there is a bad type yet to fix.

@ebachard
Copy link
Author

ebachard commented May 1, 2017

STUPID GITHUB ... please rename the file in Makefile-Linux, or simply Makefile if there is no risk to interfere with another similar file.

Makefile-Linux.txt

@ebachard
Copy link
Author

ebachard commented May 1, 2017

Same thing for the diff : please rename it in broken_linux.diff, and then it could be applied as a simple patch:

  1. put it on the root dir

  2. type in the terminal:

patch -p0 --dry-run < broken_linux.diff

If nothing wrong occurs, type without --dry-run, and the patch will be applied.
patch -p0 < broken_linux.diff

To remove the changes : patch -p0 -R <broken_linux.diff

Thanks

@ebachard
Copy link
Author

ebachard commented May 1, 2017

broken_linux.diff.txt

@ebachard
Copy link
Author

ebachard commented May 1, 2017

As example, a working Makefile using SDL2 + OpenGL 2 example (for OpenGL 3, modifications are needed)

Last but not least : add the code to test ImWindow (uff ..)
Makefile-Linux.txt

@thennequin
Copy link
Owner

thennequin commented May 4, 2017

Hi,
I use GENie for generating solution, it can make premake too.
The binary is available on the GENie page.
And for now i use it only on Windows, i have no time for other platforms.

But you only need to include all the Im*.cpp & Im*.h files in your project, but you need ImGui 1.46.
Thanks for the patch, i made changes for fix your issues.

@ebachard
Copy link
Author

@thennequin : thanks a lot for your answer, and apologies for the long delay.

Ok, I understand what you mean, I'll test what you suggested asap. Once Il'll have made some progress, I'll be back and add further comments. Please be patient (my free time is very limited until middlle june).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants