[Interest] WIndows | QMake | DLL

2016-02-10 Thread Igor Mironchik

Hi guys,

I'm trying to build my project on windows using MSVC 2013.

Project consist of shared lib project and app project. app project 
depends on shared lib.


Everything is fine, but on final link I always receive error like: 
"cannot open input file MyDll.lib".


MyDll.dll is built, but MyDll.lib doesn't exists.

Is it qmake's error?

How to solve it?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] WIndows | QMake | DLL

2016-02-10 Thread Yves Bailly

> -Original Message-
> I'm trying to build my project on windows using MSVC 2013.
> 
> Project consist of shared lib project and app project. app project
> depends on shared lib.
> 
> Everything is fine, but on final link I always receive error like:
> "cannot open input file MyDll.lib".
> 
> MyDll.dll is built, but MyDll.lib doesn't exists.
> 
> Is it qmake's error?

If you're coming from a GCC world, there's an important difference between GCC 
and MSVC: GCC exports symbols by default, while MSVC doens't. In MSVC, you need 
to explicitly exports the symbols you want to link against in other projects.
If you don't export anything, then MSVC won't generate the .lib file.

See:
https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx
https://msdn.microsoft.com/en-us/library/a90k134d.aspx

...or Google for "__declspec(dllexport)".

Hope this helps,

--
Yves Bailly
Software developer
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] WIndows | QMake | DLL

2016-02-10 Thread Nye
Hello,
Are you shadow-building? Usually this creates some confusion about where
files are to be put, at least this is my experience with win.

Kind regards.

On Wed, Feb 10, 2016 at 5:04 PM, Igor Mironchik 
wrote:

> Hi guys,
>
> I'm trying to build my project on windows using MSVC 2013.
>
> Project consist of shared lib project and app project. app project depends
> on shared lib.
>
> Everything is fine, but on final link I always receive error like: "cannot
> open input file MyDll.lib".
>
> MyDll.dll is built, but MyDll.lib doesn't exists.
>
> Is it qmake's error?
>
> How to solve it?
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] WIndows | QMake | DLL

2016-02-10 Thread Igor Mironchik

Thank you.

Yves Bailly is right, I forgot about Q_DECL_EXPORT & Q_DECL_IMPORT

On 10.02.2016 18:13, Yves Bailly wrote:

-Original Message-
I'm trying to build my project on windows using MSVC 2013.

Project consist of shared lib project and app project. app project
depends on shared lib.

Everything is fine, but on final link I always receive error like:
"cannot open input file MyDll.lib".

MyDll.dll is built, but MyDll.lib doesn't exists.

Is it qmake's error?

If you're coming from a GCC world, there's an important difference between GCC 
and MSVC: GCC exports symbols by default, while MSVC doens't. In MSVC, you need 
to explicitly exports the symbols you want to link against in other projects.
If you don't export anything, then MSVC won't generate the .lib file.

See:
https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx
https://msdn.microsoft.com/en-us/library/a90k134d.aspx

...or Google for "__declspec(dllexport)".

Hope this helps,

--
Yves Bailly
Software developer
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [ANN] build2 - C++ build toolchain

2016-02-10 Thread Matthew Woehlke
On 2016-02-09 04:04, Diego Iastrubni wrote:
> On Mon, Feb 8, 2016 at 11:21 PM, Thiago Macieira wrote:
>> qmake's philosophy is "assume everything is there and just use it".
>> It's meant mostly for using Qt itself, so you can be sure that all
>> of it is present. If you use third-party libraries and they're not
>> present, you'll get a compilation error somewhere.
> 
> Yes, right. That is why I am probably barking at the wrong tree. I need
> CMake support only.
> 
> Integrating 3rd party software into Java/ObjC/Swift code is trivial, there
> are lots of project handling this. Its very sad that in 2016 we still don't
> have something like that can help integrating 3rd party libraries into my
> C++ code.
> 
> How do you guys integrate 3rd party libraries into your code?

Don't do that. By doing so, you are assuming responsibility for all the
bugs (especially security issues) of said libraries. Most Linux
distributions refuse to package any software that bundles third party
components for this reason (and others, but the security issue is a
deal-breaker).

Another down side is that I may not want to use the version you are
trying to bundle. For one, it's superfluous if I already have that library.

The reason you can get away with this with e.g. Java is because it is a
much more closed ecosystem with a rigidly specified mechanism for
providing package information (but still has all of the downsides listed
above). Unfortunately we don't have that for C++ (although properly
written CMake does a darned good job of coming close).

-- 
Matthew

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [ANN] build2 - C++ build toolchain

2016-02-10 Thread Matthew Woehlke
On 2016-02-09 22:43, Konstantin Podsvirov wrote:
> And the Qt project provides great support CMake, how to use the frame (export 
> modules), and support Qt Creator IDE.

Yes, Qt is practically a poster child for what projects *ought* to be
doing to make themselves easy to use by other CMake projects... and it's
not even itself built with CMake! Seriously, you all (Qt folk) do a
really great job there; *thank you* :-).

p.s. For "embedding" third party libraries in a CMake-based project,
CMake external projects are The Right Thing To Do. (But as elsewhere
stated, that's rather OT for here.)

-- 
Matthew

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [ANN] build2 - C++ build toolchain

2016-02-10 Thread Konstantin Tokarev


10.02.2016, 22:17, "Matthew Woehlke" :
> On 2016-02-09 04:04, Diego Iastrubni wrote:
>>  On Mon, Feb 8, 2016 at 11:21 PM, Thiago Macieira wrote:
>>>  qmake's philosophy is "assume everything is there and just use it".
>>>  It's meant mostly for using Qt itself, so you can be sure that all
>>>  of it is present. If you use third-party libraries and they're not
>>>  present, you'll get a compilation error somewhere.
>>
>>  Yes, right. That is why I am probably barking at the wrong tree. I need
>>  CMake support only.
>>
>>  Integrating 3rd party software into Java/ObjC/Swift code is trivial, there
>>  are lots of project handling this. Its very sad that in 2016 we still don't
>>  have something like that can help integrating 3rd party libraries into my
>>  C++ code.
>>
>>  How do you guys integrate 3rd party libraries into your code?
>
> Don't do that. By doing so, you are assuming responsibility for all the
> bugs (especially security issues) of said libraries. Most Linux
> distributions refuse to package any software that bundles third party
> components for this reason (and others, but the security issue is a
> deal-breaker).

That's double-ended sword actually: by using external libraries you take
responsibility for all the bugs present in all releases of these libraries 
except ones you have QA for. Also, in case of Linux distributions they can
apply 3rd party patches to these libraries changing behavior and possibly
leading to bugs in your application.

Also, in many circumstances (embedded systems, stand-alone binary packages)
you just cannot rely on external distributor to fix security bugs for you.

So, unless your goal is to prepare package for particular distro, there is
no certain answer.

>
> Another down side is that I may not want to use the version you are
> trying to bundle. For one, it's superfluous if I already have that library.
>
> The reason you can get away with this with e.g. Java is because it is a
> much more closed ecosystem with a rigidly specified mechanism for
> providing package information (but still has all of the downsides listed
> above). Unfortunately we don't have that for C++ (although properly
> written CMake does a darned good job of coming close).
>
> --
> Matthew
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-- 
Regards,
Konstantin
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] background uploads in iOS

2016-02-10 Thread Jason H
I was reading on how I can do background uploads and it seems as os iOS 7, 
there is a facility to do this. 
( 
https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/index.html
 )
( 
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW22
 )

I also know what Qt has to use the iOS networking APIs, and was wondering if 
this is already supported in some degree? I was thinking I could use: 
UIBackgroundModes: fetch to post the content? I found this page
( http://hayageek.com/ios-background-fetch/ ) that says I need to call a 
completion handler, but I am unsure as to where I add this in a QML app?

Many thanks in advance
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] background uploads in iOS

2016-02-10 Thread mark diener
maybe?

https://github.com/colede/qt-app-delegate

md

On Wed, Feb 10, 2016 at 2:19 PM, Jason H  wrote:
> I was reading on how I can do background uploads and it seems as os iOS 7, 
> there is a facility to do this.
> ( 
> https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/index.html
>  )
> ( 
> https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW22
>  )
>
> I also know what Qt has to use the iOS networking APIs, and was wondering if 
> this is already supported in some degree? I was thinking I could use: 
> UIBackgroundModes: fetch to post the content? I found this page
> ( http://hayageek.com/ios-background-fetch/ ) that says I need to call a 
> completion handler, but I am unsure as to where I add this in a QML app?
>
> Many thanks in advance
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [ANN] build2 - C++ build toolchain

2016-02-10 Thread Stephen Kelly
Matthew Woehlke wrote:

> On 2016-02-09 22:43, Konstantin Podsvirov wrote:
>> And the Qt project provides great support CMake, how to use the frame
>> (export modules), and support Qt Creator IDE.
> 
> Yes, Qt is practically a poster child for what projects *ought* to be
> doing to make themselves easy to use by other CMake projects... and it's
> not even itself built with CMake! Seriously, you all (Qt folk) do a
> really great job there; *thank you* :-).

Well it should be the poster child! I designed and implemented both the 
CMake features and the Qt side so it's not surprising. Conway's Law ensures 
the result after that.

Steve.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Is QEventPrivate a remnant?

2016-02-10 Thread Nye
Hello,
In qcoreevent.h one could see that a pointer to the forward
declared QEventPrivate is declared as a member of QEvent, however I wasn't
able to see that class defined anywhere. Is this a leftover from a previous
version or something that was never implemented? As I'm implementing a few
of my own events do I need to worry about this, or should I simply add the
members directly to QEvent?

Exact location in qcoreevent.h:
http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qcoreevent.h#n303

Kind regards.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Is QEventPrivate a remnant?

2016-02-10 Thread Thiago Macieira
On quinta-feira, 11 de fevereiro de 2016 02:48:11 PST Nye wrote:
> Hello,
> In qcoreevent.h one could see that a pointer to the forward
> declared QEventPrivate is declared as a member of QEvent, however I wasn't
> able to see that class defined anywhere. Is this a leftover from a previous
> version or something that was never implemented?

It was never implemented. We haven't had the need.

> As I'm implementing a few
> of my own events do I need to worry about this, or should I simply add the
> members directly to QEvent?

You cannot modify QEvent.

Do you mean your own class? Whether it's derived from QEvent or not is 
irrelevant to whether you can add members.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Is QEventPrivate a remnant?

2016-02-10 Thread Nye
Hello and thanks for the prompt reply!
> You cannot modify QEvent.
> Do you mean your own class? Whether it's derived from QEvent or not is
> irrelevant to whether you can add members.

I meant that I'm deriving from QEvent. When I derived from
QCoreApplication, I also did it for QCoreApplicationPrivate and passed my
private object instance trough the QCoreApplication(QCoreApplicationPrivate
&) constructor. So I was wondering if I'm missing something with the event,
although as it's was never implemented I believe I'm okay.

Thanks for the input!

On Thu, Feb 11, 2016 at 3:21 AM, Thiago Macieira 
wrote:

> On quinta-feira, 11 de fevereiro de 2016 02:48:11 PST Nye wrote:
> > Hello,
> > In qcoreevent.h one could see that a pointer to the forward
> > declared QEventPrivate is declared as a member of QEvent, however I
> wasn't
> > able to see that class defined anywhere. Is this a leftover from a
> previous
> > version or something that was never implemented?
>
> It was never implemented. We haven't had the need.
>
> > As I'm implementing a few
> > of my own events do I need to worry about this, or should I simply add
> the
> > members directly to QEvent?
>
> You cannot modify QEvent.
>
> Do you mean your own class? Whether it's derived from QEvent or not is
> irrelevant to whether you can add members.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Is QEventPrivate a remnant?

2016-02-10 Thread Thiago Macieira
On quinta-feira, 11 de fevereiro de 2016 03:27:19 PST Nye wrote:
> Hello and thanks for the prompt reply!
> 
> > You cannot modify QEvent.
> > Do you mean your own class? Whether it's derived from QEvent or not is
> > irrelevant to whether you can add members.
> 
> I meant that I'm deriving from QEvent. When I derived from
> QCoreApplication, I also did it for QCoreApplicationPrivate and passed my
> private object instance trough the QCoreApplication(QCoreApplicationPrivate
> &) constructor. So I was wondering if I'm missing something with the event,
> although as it's was never implemented I believe I'm okay.

You should not have done that.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest