Problem statically linking to Botan on Windows using MSVC - qt

I am trying to statically link a Qt library I am building to Botan using MSVC on Windows and am receiving the following error.
..\..\3rdparty\temp\botan-msvc\build\include\botan/secmem.h(129) : error C2589: '(' : illegal token on right side of '::'
..\..\3rdparty\temp\botan-msvc\build\include\botan/secmem.h(128) : while compiling class template member function 'void Botan::MemoryRegion<T>::copy(const T [],size_t)'
with
[
T=Botan::byte
]
..\..\3rdparty\temp\botan-msvc\build\include\botan/buf_comp.h(41) : see reference to class template instantiation 'Botan::MemoryRegion<T>' being compiled
with
[
T=Botan::byte
]
..\..\3rdparty\temp\botan-msvc\build\include\botan/secmem.h(129) : error C2059: syntax error : '::'
This does not occur with MinGW. It also occurs when I comment out all Botan-related code. What does this mean and how can I solve it - also why does it not occur with MinGW?

I was able to figure out the issue with help from Jack Lloyd's comment. Apparently something that's included through one path or another #defined "min". I just undefined it and my library compiles and links perfectly. Thanks Jack!

Related

Robot framework - Red Editor - Unknown library error message

I'm trying to import some classes using the "Library" keyword. I get the error message:
"Unknown library. Try to use Quick Fix (Ctrl+1) or add
library to red.xml for proper validation
Some of these classes exist in the same folder, other exists in another one. But same error for both cases.
ctrl+1 doesn't help, it shows this error message:
"Additional info: ((u"Importing test library '' failed:
ImportError: No module named infra".
And I'm not sure where to add to red.xml.
Any idea how to import classes and fix this error?
Any help would be appreciated!

qt5 and usblib in win7 (mingw32) linker produces undefined references to `_imp__SetupDiGetClassDevsA#16'

I'm using qt5.5 in linux and win7 (mingw32) ... in linux it works (i had to build new usblibs for compatibility reasons)
in windows using this library
/usr/local/.../code-qt/libusb-1.0.19-rc1-win/MinGW32/static/
i get the following errors and a few more, all with some
"_imp__SetupDixxxxxxx" being undefined
since the libusb build in windows seems quite more complicated, i was unable to figure out how to do it
at this point i have no clue what is wrong and any help is highly appreciated
i have no problems rebuilding the lib with ming32w inside or outside of qt5 creator or any other way, but i would need to have a few steps described on how to proceed.
cheers EinHexenMeister
E:\code-qt\qtHidTest\HidTest\windows\hid.c:289: error: undefined reference to `_imp__SetupDiGetClassDevsA#16'
E:\code-qt\qtHidTest\HidTest\windows\hid.c:298: error: undefined reference to `_imp__SetupDiEnumDeviceInterfaces#20'
E:\code-qt\qtHidTest\HidTest\windows\hid.c:491: error: undefined reference to `_imp__SetupDiDestroyDeviceInfoList#4'
E:\code-qt\qtHidTest\HidTest\windows\hid.c:313: error: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA#24'
E:\code-qt\qtHidTest\HidTest\windows\hid.c:347: error: undefined reference to `_imp__SetupDiEnumDeviceInfo#12'
You need to link additional libraries for windows, add in your .pro file:
win32 {
LIBS += -lhid -lsetupapi
}

compilation issue : libvlc exception t is missing

I'm trying to mix Qt and libVLC, I've downloaded libs, tried some tutorials, but I always stop on the same error and I can't find any solution in Google...
Here's the compilation output
error: unknown type name 'libvlc_exception_t'; did you mean 'libvlc_event_t'?
I'm running MacOS 10.8.4
EDIT : the libvlc_exception_t is not even documented on LibVLC Doc
That's why :
doc/ChangeLog-2010: The libvlc_exceptions have been removed from libvlc.

Qmake build and gcc includes

I am working with Qt and kinda new to it. I want to build a Qt application and created devprog.pro file. However, after executing qmake and make I get the error
c:\qt473\include\qtcore../../src/corelib/global/qglobal.h(45)
: fatal error C10 83: Cannot open
include file: 'stddef.h': No such file
or directory
So I specified the gcc 4.4.1 include location and the error messages (amongst others) I get is:
c:\codeblocks\MinGW\lib\gcc\mingw32\4.4.1\include\stddef.h(211)
: error C2371: ' size_t' :
redefinition; different basic types
predefined C++ types (compiler internal)(19) : see declaration of
'size_ t'
C:\CodeBlocks\MinGW\include\string.h(126)
: error C2143: syntax error : missing
';' before '*'
C:\CodeBlocks\MinGW\include\string.h(126)
: error C4430: missing type specifier
- int assumed. Note: C++ does not support default-int
My question is:
1. How can resolve such error problems as I've scratched my hair off trying to solve this.
2. Is there a way to make automatically let qmake detect your main gcc mingw location without having to set it for each project during qmake execution?

Qt + Zlib => error LNK2005: _deflate_copyright already defined in QtCored.lib(deflate.obj) zlibstat.lib

When I link my application I receive the following message:
error LNK2005: _deflate_copyright already defined in QtCored.lib(deflate.obj) zlibstat.lib
I'm not sure of the problem, but... I use QT and ZLib. Both are "static libraries". The problem is that the QTCore.lib contains ZLib too!
Project Qt: contains its own version on ZLib.
Project GenericLib: use an external ZLib.lib (cannot be linked to Qt).
Project main: use Qt + Generic lib.
As I say, I'm not sure that it is the problem. But, anyway, if someone has an idea to help me?
Thanks for your help.

Resources