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

phpcpp and php-gtk3 with mingw #21

Closed
subabrain opened this issue May 10, 2020 · 31 comments
Closed

phpcpp and php-gtk3 with mingw #21

subabrain opened this issue May 10, 2020 · 31 comments

Comments

@subabrain
Copy link
Contributor

Hello together,

i have a problem when compiling phpgtk3 with mingw from debian - the code of phpgtk3 works to compile but if its compiling the phpcpp lib there are some strange errors:

/usr/i686-w64-mingw32/include/phpcpp/inivalue.h:17:21: error: variable ‘Php::PHPCPP_EXPORT Php::IniValue’ has initializer but incomplete type
class PHPCPP_EXPORT IniValue

... and so on ....

Does somebody know whats this Problem?

Greets
Robert

@subabrain
Copy link
Contributor Author

Ok i think its not a Problem with phpgtk3 more than a Problem with MinGW and PHP-CPP ...

@scorninpc
Copy link
Owner

Any php extensions with MinGW is a problem. If you compile PHP-CPP you can compile PHP-GTK3

@subabrain
Copy link
Contributor Author

subabrain commented Oct 15, 2020

okay - today i will try again to compile to windows :)

@scorninpc
Copy link
Owner

Nice!

But i'm working on a generated code, non dependency, new code

https://github.com/scorninpc/php-gtk4

With this we'll compile natively on windows, without dependencies, and will support gtk 3 and gtk 4. So i'm unmaintenancing this repo (php-gtk3) for now

@subabrain
Copy link
Contributor Author

ah ok - great :)

tried now ... but i got it working with linux but its a bit hard to get it with the mingw compiler under debian ...

greets

@scorninpc
Copy link
Owner

mingw is a problem as I said. You will not get this work with mingw

https://stackoverflow.com/questions/3711327/how-do-you-compile-a-php-extension-on-windows-with-cygwin-mingw

You really need VS to compile PHP-CPP on windows, and then compile PHP-GTK easy

@subabrain
Copy link
Contributor Author

hello

okay - ill try this :)

@subabrain
Copy link
Contributor Author

Hi there,

i think its easier than expected. Just had to modify the makefile to create .dll files - but i just have to test ...

Greets
Robert

@subabrain
Copy link
Contributor Author

subabrain commented Oct 2, 2021

hi boys and girls,

i finaly get php-cpp compile under cygwin ... with cmake ... and now i want to integrate it in the llibs ...

edit: okay i got the phpcpp.dll.a now - its a step further now :)

thanks a lot!
Robert

@scorninpc
Copy link
Owner

scorninpc commented Oct 3, 2021

Nice to know @subabrain. What do you want now? just add php-gtk lib on cmake list of libs when compile PHP source and do the compile to see the errors of the lib now.

Make a "HOW TO" compile the php-cpp, to others try compile it too, and mabe i can help more =)

@subabrain
Copy link
Contributor Author

Hi,

okay - i thought it was wrong - just get the phpcpp-common .dll file but not the real phpcpp project...

so i get phpcpp it in an .a file (that works) ... i try now to compile it from cmake / visual studio ... but i think there are some code errors -> maybe im wrong - but i believe that here is c/c++ mixed in one file ...

i will try further ...

Greets
Robert

@subabrain
Copy link
Contributor Author

Hi,

okay - i got now the phpcpp-common.lib compiled -> with visual studio.
Do i have to load this .lib for compiling the main phpcpp?

would be nice if you could answer ....

Greets
Robert

@scorninpc
Copy link
Owner

You need the phpcpp.dll to compile php-gtk

@subabrain
Copy link
Contributor Author

Hi,

yes i know - but could i do it with the following:

make the .a file so its a static lib of phpcpp - then compile phpgtk3 with this .a file ...... then compile the .so from phpgtk3 to .dll??

greets
Robert

@scorninpc
Copy link
Owner

Oh Robert, I would really like to help, but I don't know anything about windows

@subabrain
Copy link
Contributor Author

Hi,

okay - i see.... i figured out that it is because of the php-cpp files which are stored in the zend folder ... so now i hope i can make a .dll of the .o and phpcpp lib - will try after work :)

stay tuned!

Greets
Robert

@subabrain
Copy link
Contributor Author

subabrain commented Oct 14, 2021

okay - the release is near :)

edit: with wsl ... :)

Greets
Robert

@subabrain
Copy link
Contributor Author

Okay,

i have the .dll of phpcpp now .... now just compile phpgtk3 :)

Greets
Robert

@scorninpc
Copy link
Owner

scorninpc commented Dec 21, 2021

Nice, you can share the dll? or the code to compile?

@subabrain
Copy link
Contributor Author

subabrain commented Dec 22, 2021

Hi,

sorry the .dll is corrupt :(

i try to make a mingw 32 bit version - i hope it will be working :)

ITS NOT EASY - BUT I GOT VERY FAR :)

Greets
Robert

@subabrain
Copy link
Contributor Author

okay,

i think its ok now - but one missing .dll:

2022-01-03 00_00_55-Dependencies (x64)

maybe someone could help :)

GN8!

@scorninpc
Copy link
Owner

I would really like to be helping you, but for over 10 years I haven't opened a windows. the last version I saw was NT

@subabrain
Copy link
Contributor Author

😄

@subabrain
Copy link
Contributor Author

subabrain commented Jan 22, 2022

Ok,

if somebody can speak German - this is the link to my describtion how make dlls under Ubuntu:

https://burncycle.de/2022/01/06/dll-von-cpp-datei-unter-linux-erstellen/

(sorry page at the moment not reachable - fix it soon)

Greets
Robert

@subabrain
Copy link
Contributor Author

okay,

i think i have the solution.

just do something like this:

https://stackoverflow.com/questions/9360280/how-to-make-a-lib-file-when-have-a-dll-file-and-a-header-file

on my dll file :)

then run in visual studio with this combination of lib / dll files.

Greets
Robert

@scorninpc
Copy link
Owner

scorninpc commented May 5, 2022

@subabrain, and if we create a docker? it can run on mac and windows without problems and dependencies

@subabrain
Copy link
Contributor Author

hmm - i dont think so ..... i try it once again today evenening .... if it not works i will do it maybe a docker ...

Greets
Robert

@scorninpc
Copy link
Owner

Nice to ear that. But i'm seen a lot people with problem to compile anything about PHP on windows 10 and 11. Anyway, i'll try to do some little tests with docker and will post here

@subabrain
Copy link
Contributor Author

hi,

sorry for the long delay -> i will compile php-cpp with cmake for windows and then i compile with visual studio php-gtk3 :)

Greets
Robert

@subabrain
Copy link
Contributor Author

subabrain commented Aug 1, 2022

ok,

i got the lib/dll now for windows from phpcpp :)

here:

CopernicaMarketingSoftware/PHP-CPP#443

now itry to compile phpgtk 3 with viusal studio :)

Greets
Robert

@scorninpc
Copy link
Owner

Better work and documentation on issue #24

@scorninpc scorninpc closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants