ImWindow icon indicating copy to clipboard operation
ImWindow copied to clipboard

ImWindow not buildable on Linux

Open ebachard opened this issue 7 years ago • 7 comments

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 avatar May 01 '17 18:05 ebachard

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 avatar May 01 '17 19:05 ebachard

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 avatar May 01 '17 19:05 ebachard

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 avatar May 01 '17 19:05 ebachard

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

ebachard avatar May 01 '17 19:05 ebachard

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.

thennequin avatar May 04 '17 10:05 thennequin

@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).

ebachard avatar May 10 '17 12:05 ebachard