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

DOtherSide.lib #26

Closed
bubnenkoff opened this issue Sep 17, 2015 · 38 comments
Closed

DOtherSide.lib #26

bubnenkoff opened this issue Sep 17, 2015 · 38 comments
Labels

Comments

@bubnenkoff
Copy link

Could you provide ready to use DOtherSide.lib lib for Windows?

@filcuc
Copy link
Owner

filcuc commented Sep 19, 2015

i may, but should i? really there're many things to consider:

  1. multiple compilers (mingw, visual studio, clang)
  2. multiple qt version
  3. multiple architecture
    what i see it's that i could finish in doing
  4. libDOtherSide for VS 2013 - Qt 5.5 both 64/32bit
  5. libDOtherSide for VS 2015 - Qt.5.5 both 64/32bit
  6. libDOtherSide for mingw48/49 - QT.5.5 both 64/32
    the result is 6 build configurations to maintain.

Furthermore this implies that i must to keep up the binaries at each compiler or qt update..dunno.
However can you shade some light what's the problem in building it from source?
This is the 2nd issue that's get opened for requesting pre-built binaries for Windows.

Given that, i made a video for showing how to build this lib for windows. However it was for the previous git version but i think that most of the steps (related only to the lib and not to nim/d bindings) still apply.

You can see it here

@bubnenkoff
Copy link
Author

Big thanks for detail answer. I will try to do it.

@bubnenkoff
Copy link
Author

Can I use qt creator for creation GUI and than simple link with DOtherSide?
I have never wrote GUI apps...

@filcuc
Copy link
Owner

filcuc commented Sep 23, 2015

Can you explain to me better what you're trying to do? Which languages you want to use for developing your app and how you want to use libDOtherSide?

@bubnenkoff
Copy link
Author

I using D, and if you would able provide me ready to use build I would be very glad. If licence do not allow to allow to distribute it I will try to build all myself, but sometime for not very good programmers it's much easier to start from ready to use lib, than try to produce all steps

@bubnenkoff
Copy link
Author

There is project that allow to build Qt with D, but it's still do not have bins for test (hope soon they will be released) https://github.com/Syniurge/Calypso

But a lot of people now are looking for modern GUI lib for D, that will allow them to easier write code. I tried to other lib like TK, but without graphical designer it's very hard to use them. So I hope that with your lib I will able to use Qt Builder

@bubnenkoff
Copy link
Author

I troed to build it, but I got next errors: http://img.ctrlv.in/img/15/09/24/5603ab7da23d6.png

@bubnenkoff
Copy link
Author

So if you can please to upload in any place libs for D and Qt 5.5 32Bits.
If I right understand I would need only DOtherSide and Qt for programming in D. Or not? Would I need to have VS?

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

This is caused by #28

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

Fixed in 14bf9fd

@bubnenkoff
Copy link
Author

Yes, it's helped! Thanks!

@bubnenkoff
Copy link
Author

But is it's possible to use Qt Creator for creation graphical apps and writing logic in D?

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

yes sure! Write your UI (.qml files) inside the creator and logic in d.
See the contactapp example

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

@bubnenkoff
Copy link
Author

In video you had renamed output DotherSide lib ti libDotherSide.
Do I need to rename it now?
I placed this lib to sample dub project and get next error http://img.ctrlv.in/img/15/09/24/5603e5484aec6.png

It's just dub default hello world app. Now App that include qml example.

Please could you write in docs where in Windows I should put your lib and update information about should I rename it or no.

@bubnenkoff
Copy link
Author

Also I have got question is the DOtherSide allow me use 100% of QT functionality, or it's have some limitation?

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

please see here,
https://github.com/filcuc/dqml/blob/master/dub.json
you should add a "lib" directive in you dub file
for linking the libDOtherSide. The name of the dll is platform dependent. On unix it's with prefixed with "lib" on windows not. Try and see if you can sort it out.

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

Yes there're some limitations.
Right now you cannot create custom QQuickItems from D or Nim. So code a QQuickItem from D.
And i didn't add support for every datatype. However i'm willing to improve if you need support

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

Please before starting your project please download the dqml project
and compile an example to see how it works

@bubnenkoff
Copy link
Author

you should add a "lib" directive in you dub file

ok I will try do it.

Right now you cannot create custom QQuickItems

Ok at start I will enough predefined items) It's better to any GUI than no GUI :)

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

as i wrote you first clone the DQml repo somewhere through git.
and compile one of the bundled examples.

2015-09-24 14:15 GMT+02:00 Dmitry Bubnenkov notifications@github.com:

I am getting strange error
http://img.ctrlv.in/img/15/09/24/5603e86bd7b2a.png
it's look like it's can't find dub.json (I use latest version of dub).

you should add a "lib" directive in you dub file
ok I will try do it.

Right now you cannot create custom QQuickItems
Ok at start I will enough predefined items) It's better to any GUI than no
GUI :)


Reply to this email directly or view it on GitHub
#26 (comment).

Filippo Cucchetto

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

After you successfully built the bundled examples. We can move forward. You will also have a working environment :)

@bubnenkoff
Copy link
Author

I done dub dqml fetch
Clone dqml to folder
move to "hello world" app folder
copy all libs to it
run dub and now I am getting this error message: http://img.ctrlv.in/img/15/09/24/5603ebd6cdfe5.png

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

No.
cd "your desktop"
git clone https://github.com/filcuc/dqml.git
cd dqml
dub build

and post the error you get from this steps.
It should fail because it doesn't find the libDOtherSide.dll.
You should add the directory where you put it in you PATH environement variable.
Furthermore you should not link the .lib (cause it's not a static lib) but the .dll !!!

@bubnenkoff
Copy link
Author

D:\foo>git clone https://github.com/filcuc/dqml.git
Cloning into 'dqml'...
remote: Counting objects: 155, done.
remote: Total 155 (delta 0), reused 0 (delta 0), pack-reused 155Receiving object
Receiving objects: 62% (97/155)
Receiving objects: 100% (155/155), 31.67 KiB | 0 bytes/s, done.
Resolving deltas: 100% (47/47), done.
Checking connectivity... done.

D:\foo>cd dqml

D:\foo\dqml>dub build
Main package must have a binary target type, not sourceLibrary. Cannot build.

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

Yep i because dqml is a souce package, you should try to compile an example!
cd "your desktop"
git clone https://github.com/filcuc/dqml.git
cd dqml
cd examples
cd helloworld
dub build

if it files add libDOtherSide.dll to your PATH enviroment variable or put it on C:\Windows\system32 :D

@bubnenkoff
Copy link
Author

I placed:
DOtherSide.dll
DOtherSide.lib

to system32
then run:
D:\foo\dqml\examples\helloworld>dub build

and got:

Linking...
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
DOtherSide.lib
Warning 2: File Not Found DOtherSide.lib
.dub\build\application-debug-windows-x86-dmd_2068-4DED4435482D06B8A8EB0F88F707C5
33\helloworld.obj(helloworld)
Error 42: Symbol Undefined _dos_qabstractlistmodel_create
.dub\build\application-debug-windows-x86-dmd_2068-4DED4435482D06B8A8EB0F88F707C5
33\helloworld.obj(helloworld)
Error 42: Symbol Undefined _dos_qabstractlistmodel_delete
.dub\build\application-debug-windows-x86-dmd_2068-4DED4435482D06B8A8EB0F88F707C5
33\helloworld.obj(helloworld)

@bubnenkoff
Copy link
Author

Also I tried to placed this dll near hello world app:

D:\foo\dqml\examples\helloworld>dir
Том в устройстве D имеет метку Data
Серийный номер тома: DA61-9F17

Содержимое папки D:\foo\dqml\examples\helloworld

24.09.2015 17:37

.
24.09.2015 17:37 ..
24.09.2015 17:34 .dub
24.09.2015 15:46 43 .gitignore
24.09.2015 14:43 340 992 DOtherSide.dll
24.09.2015 14:43 11 842 DOtherSide.exp
24.09.2015 14:43 1 563 868 DOtherSide.ilk
24.09.2015 14:43 20 522 DOtherSide.lib
24.09.2015 14:43 3 330 048 DOtherSide.pdb
24.09.2015 15:46 326 dub.json
24.09.2015 17:34 39 dub.selections.json
24.09.2015 15:46 source
8 файлов 5 267 680 байт
4 папок 118 642 995 200 байт свободно

D:\foo\dqml\examples\helloworld>dub
Performing "debug" build using dmd for x86.
helloworld ~master: building configuration "application"...
Linking...
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
DOtherSide.lib
Error 43: Not a Valid Library File
--- errorlevel 1
dmd failed with exit code 1.

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

i tried this evening..the reason it's that DMD on windows use OPTLINK has a linker. This is turn is a shit. Now i'm trying to see if with GDC (so with Mingw32) the things gets solved

@bubnenkoff
Copy link
Author

bubnenkoff commented Sep 24, 2015 via email

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

go on if you want. i'll try to give a go with mingw and ping you back

@bubnenkoff
Copy link
Author

bubnenkoff commented Sep 24, 2015 via email

@filcuc
Copy link
Owner

filcuc commented Sep 24, 2015

ok i was able to build the examples by using mingw32 and converting the .dll format for making it compatible with the shitty linker used on windows by dmd.
Tomorrow evening i'll write the complete procedure.

@bubnenkoff
Copy link
Author

ok, I am waiting for build instruction

@filcuc
Copy link
Owner

filcuc commented Sep 26, 2015

i wrote a step by step tutorial that you can read on the dqml repository, here
Let me know if it works for you

@bubnenkoff
Copy link
Author

bubnenkoff commented Sep 26, 2015 via email

@filcuc
Copy link
Owner

filcuc commented Sep 26, 2015

Sorry
but i think that's out of scope. I don't have time for that :)
You can find a lot of resources on qml.
You can start by reading the qml sections here here

2015-09-26 20:14 GMT+02:00 Dmitry Bubnenkov notifications@github.com:

Cool! It's work!!! I build examples!
Could you make short video or several screenshots about building Apps in QT
creator?


Reply to this email directly or view it on GitHub
#26 (comment).

Filippo Cucchetto

@filcuc
Copy link
Owner

filcuc commented Sep 26, 2015

Given that i'm available if you encounter bugs or need to improve the
supported datatypes.
Finally i'm happy that it worked for you too.
As you see windows it's not a developer friendly environment :)
I encourage you to always create .bat files for your build environements
(also with other projects) and to never put anything in you $PATH global
variable.

2015-09-26 23:56 GMT+02:00 Filippo Cucchetto filippocucchetto@gmail.com:

Sorry
but i think that's out of scope. I don't have time for that :)
You can find a lot of resources on qml.
You can start by reading the qml sections here here

2015-09-26 20:14 GMT+02:00 Dmitry Bubnenkov notifications@github.com:

Cool! It's work!!! I build examples!
Could you make short video or several screenshots about building Apps in
QT
creator?


Reply to this email directly or view it on GitHub
#26 (comment).

Filippo Cucchetto

Filippo Cucchetto

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

No branches or pull requests

2 participants