Audiere incomplete universal character name \U Error - c++

Hey so I'm trying to make a music player using QT and Audiere. First I installed Audiere and put the header file in the compiler's include folder. Then I added the .lib file to the QT project. I wrote the following code:
AudioDevicePtr device(OpenDevice());
if(!device){
//failure
}
SampleSource* source = OpenSampleSource("C:\Users\Amenechi\Downloads\LMFAO - Sexy And I Know It");
OutputStreamPtr stream(OpenSound(device,source,true));
if(!stream){
//failure
}
stream->setRepeat(true);
stream->setVolume(0.5f);
stream->play();
But I get this error:
http://s20.postimage.org/u1yxk0d0s/Untitled.jpg
Now I'm not sure where it went wrong, maybe i installed the audiere library incorrectly?
EDIT:
Hey here's the compile output if that helps.
07:37:45: Running steps for project QTunesV2...
07:37:45: Configuration unchanged, skipping qmake step.
07:37:45: Starting: "C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe"
C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Qt/Qt5.0.1/Tools/QtCreator/bin/QTunesV1/QTunesV2-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
g++ -Wl,-subsystem,windows -mthreads -o debug\QTunesV2.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -lmingw32 -lqtmaind -LC:/Qt/Qt5.0.1/Tools/QtCreator/bin/QTunesV1/QTunesV2/../../ -laudiered -LC:\Qt\Qt5.0.1\5.0.1\mingw47_32\lib -lQt5Widgetsd -lQt5Guid -lQt5Cored -llibEGLd -llibGLESv2d -lgdi32 -luser32
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -laudiered
collect2.exe: error: ld returned 1 exit status
Makefile.Debug:80: recipe for target 'debug\QTunesV2.exe' failed
mingw32-make[1]: *** [debug\QTunesV2.exe] Error 1
mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.0.1/Tools/QtCreator/bin/QTunesV1/QTunesV2-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
mingw32-make: *** [debug] Error 2
makefile:34: recipe for target 'debug' failed
07:37:45: The process "C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project QTunesV2 (kit: Desktop Qt 5.0.1 MinGW 32bit)
When executing step 'Make'

Related

Build curl lib with Mingw compiler

I want to use the curl lib in my project (c++ QT creator on windows), I download the zip lib file from the website https://curl.se/download.html (Version 7.82.0)
and I wanted to build it using the Makefile with this commend
mingw32-make mingw32 as described in the documentation https://curl.se/docs/install.html
but unfortunately, I am getting an error
mingw32-make mingw32
[....]
gcc -s -m32 -static -o curl.exe curl.res slist_wc.o tool_binmode.o tool_bname.o
tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_wrt.o
tool_cfgable.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_filetime.o tool_findfile.o
tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_hugehelp.o
tool_libinfo.o tool_listhelp.o tool_main.o tool_msgs.o tool_operate.o tool_operhlp.o
tool_panykey.o tool_paramhlp.o tool_parsecfg.o tool_progress.o tool_strdup.o tool_setopt.o
tool_sleep.o tool_urlglob.o tool_util.o tool_vms.o tool_writeout.o tool_writeout_json.o
tool_xattr.o strtoofft.o nonblock.o warnless.o curl_ctype.o curl_multibyte.o version_win32.o
dynbuf.o -L../lib -lcurl -lwldap32 -lws2_32
../lib\libcurl.a: error adding symbols: Archive has no index; run ranlib to add one
collect2.exe: error: ld returned 1 exit status
make[1]: *** [curl.exe] Fehler 1
make[1]: Leaving directory `D:/Dev/API/curl-7.82.0/src'
make: *** [mingw32] Fehler 2
I tried to run ranlib lib\libcurl.a but the issue is still there,
does anyone have an idea about it?
One more question: is it possible also to build it with mingw64?

collect2.exe: error: ld returned 5 exit status

I've recently updated all msys2 packages and now I can't build my project.
The error occurs at the moment of linking one of .dlls - target_library.dll.
The error message isn't clear to me. What does status 5 mean?
collect2.exe: error: ld returned 5 exit status
Full message:
g++ -Wl,-s,--relax,--gc-sections -shared -Wl,-subsystem,windows -mthreads -Wl,--out-implib,C:/msys64/workspace/Project_Root_Directory/project/src/../build/release/plugins/libtarget_library.dll.a -o ../../../../build/release/plugins/target_library.dll object_script.target_library.Release -lglu32 -lopengl32 -luser32 -LC:/msys64/workspace/Project_Root_Directory/project/build/release -LC:/msys64/workspace/Project_Root_Directory/project/third-party/out/lib -LC:/msys64/workspace/Project_Root_Directory/project/deps/lib -lexif -ldecimal -lsqlite3 -lutils -LC:/Python35/libs -lpython35 -lkmlbase -lkmlengine -lkmldom -lkmlxsd -lminizip -luriparser -lkmlconvenience -lcore -lrender -lraster -lgui -LC:/msys64/workspace/Project_Root_Directory/project/deps/lib/target_library/win64 -LC:/msys64/mingw64/lib C:/msys64/mingw64/lib/libQt5Widgets.dll.a C:/msys64/mingw64/lib/libQt5WinExtras.dll.a C:/msys64/mingw64/lib/libQt5Gui.dll.a C:/msys64/mingw64/lib/libQt5Network.dll.a C:/msys64/mingw64/lib/libQt5Concurrent.dll.a C:/msys64/mingw64/lib/libQt5Xml.dll.a C:/msys64/mingw64/lib/libQt5Core.dll.a
collect2.exe: error: ld returned 5 exit status
make[4]: *** [Makefile.Release:159: ../../../../build/release/plugins/target_library.dll] Error 1
make[4]: Leaving directory '/workspace/Project_Root_Directory/project/src/modules/plugins/target_library'
make[3]: Leaving directory '/workspace/Project_Root_Directory/project/src/modules/plugins/target_library'
make[2]: *** [Makefile:384: sub-target_library-make_first] Error 2
make[2]: Leaving directory '/workspace/Project_Root_Directory/project/src/modules/plugins'
make[1]: *** [Makefile:297: sub-plugins-make_first] Error 2
make[1]: Leaving directory '/workspace/Project_Root_Directory/project/src/modules'
make: *** [Makefile:44: sub-modules-make_first] Error 2
gcc 7.1.0, Qt5 5.9.1, qmake, Win7 x64
I had the same issue.
I link my project with static library.
After mingw64 upgrade, my project stoped building with the same error.
I found out that debug version built successfully. So i compared linker flags. In release version Qt add this flags "-Wl,-s,--relax,--gc-section".
I couldn't find any information about "-s" flag, but due to this link i figured out that -gc-section flag was the reason of fail.
I added the following code to my .pro-file, and it worked
mingw {
contains(QT_ARCH, x86_64): {
LIBS+=-Wl,--no-gc-sections
}
}
Just in case someone finds this due the same problem, please, add the following flag to your compiler -Wl,--verbose (or --verbose to the linker). This will show which library was not found or give you more information about the problem.

Linking library with gcc - ld: cannot find -larpack

I am installing software on a server with no root privileges. I come across the following error during installation:
make[1]: *** [hgaprec] Error 1
make[1]: Leaving directory `/seq/.../SOFTWARE/hgaprec/src'
make: *** [all-recursive] Error 1
Making install in src
make[1]: Entering directory `/seq/.../SOFTWARE/hgaprec/src'
g++ -O3 -o hgaprec ratings.o main.o log.o hgaprec.o -larpack -llapack -
lblas -lgsl -lpthread -lgslcblas
/.../software/free/Linux/redhat_6_x86_64/pkgs/gcc_5.2.0/bin/ld: cannot
find -larpack
collect2: error: ld returned 1 exit status
make[1]: *** [hgaprec] Error 1
make[1]: Leaving directory `/seq/.../SOFTWARE/hgaprec/src'
make: *** [install-recursive] Error 1
Since library arpack could not be found, I then installed it here /seq/.../SOFTWARE/hgaprec/ARPACK and found that the process generated a static file libarpack_LINUX.a. To link this static library to gcc the following command was used:
gcc -larpack -L/seq/.../SOFTWARE/hgaprec/ARPACK/libarpack_LINUX.a
However, I keep getting the same error while installation of the software that larpack was not found. Am I using the linking command wrong?
You either want gcc main.c /seq/../SOFTWARE/hgaprec/ARPACK/libarpack_LINUX.a (you don't need -l and -L if you're specifying the full path to static library), or as #Julian_Cienfuegos suggested gcc main.c -L/seq/../SOFTWARE/hgaprec/ARPACK/ -larpack_LINUX. This assumes you're only compiling a single file called main.c which contains your main() function, and outputs the a.out binary.
EDIT: Added explanation of main.c.
My issue got solved after including the ARPACK library path as part of LD flag in configure like so:
./configure --prefix=/seq/.../SOFTWARE/hgaprec LDFLAGS="-L/seq/.../SOFTWARE/hgaprec/ARPACK/"

Encounter errors when compiling program using QT5.6 on windows 10

I want to compile a program called uartassistant using QT5.6 on windows 10,I encountered this error:
g++ -Wl,-subsystem,windows -mthreads -o debug\uartassistant.exe
debug/main.o debug/dialog.o debug/hled.o debug/moc_dialog.o
debug/moc_hled.o -lmingw32 -LF:\qt\5.6\mingw49_32\lib
F:\qt\5.6\mingw49_32\lib\libqtmaind.a -LC:\utils\postgresql\pgsql\lib
-LC:\utils\my_sql\my_sql\lib -lshell32 -LE:\uartassistannew\uartassistant\build -lqextserialportd1 -LE:\uartassistannew\uartassistant\analogwidgets -lanalogwidgets F:\qt\5.6\mingw49_32\lib\libQt5Widgetsd.a
F:\qt\5.6\mingw49_32\lib\libQt5Quickd.a
F:\qt\5.6\mingw49_32\lib\libQt5Guid.a
F:\qt\5.6\mingw49_32\lib\libQt5Qmld.a
F:\qt\5.6\mingw49_32\lib\libQt5Networkd.a
F:\qt\5.6\mingw49_32\lib\libQt5Cored.a
E:\uartassistannew\uartassistant\analogwidgets/libanalogwidgets.a(manometer.o):manometer.cpp:(.text+0x44a):
undefined reference to _imp___ZNK7QString3argEdiciRK5QChar'
E:\uartassistannew\uartassistant\analogwidgets/libanalogwidgets.a(manometer.o):manometer.cpp:(.text+0x11f8):
undefined reference to_imp___ZNK7QString3argEdiciRK5QChar'
E:\uartassistannew\uartassistant\analogwidgets/libanalogwidgets.a(manometer.o):manometer.cpp:(.text+0x1570):
undefined reference to _imp___ZNK11QMetaObject2trEPKcS1_'
E:\uartassistannew\uartassistant\analogwidgets/libanalogwidgets.a(manometer.o):manometer.cpp:(.text+0x178a):
undefined reference to_imp___ZNK11QMetaObject2trEPKcS1_'
F:/qt/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe:
E:\uartassistannew\uartassistant\analogwidgets/libanalogwidgets.a(manometer.o):
bad reloc address 0x24 in section
`.text$ZplRK7QStringS1[__ZplRK7QStringS1_]' collect2.exe: error: ld
returned 1 exit status Makefile.Debug:71: recipe for target
'debug\uartassistant.exe' failed mingw32-make[1]: *
[debug\uartassistant.exe] Error 1 mingw32-make[1]: Leaving directory
'E:/uartassistannew/build-uartassistant-Desktop_Qt_5_6_0_MinGW_32bit-Debug'
makefile:34: recipe for target 'debug' failed mingw32-make: *
[debug] Error 2 Error while building/deploying project uartassistant
(kit: Desktop Qt 5.6.0 MinGW 32bit) When executing step "Make"
12:14:13: Elapsed time: 00:18.
I compiled the same program on windows 7 using QT,no error happened.
Anyone can help me deal with it?
Thanks.

Failure on building Qt5 from source on Windows

As I would like to build my Windows version of Qt5 application (C++) statically, I downloaded the source of Qt5 from git. Installed all dependencies like Python, Perl, etc. When I ran the following command
configure.bat -static -opensource -release -nomake examples -nomake tests -platform win32-g++ -c++11 -opengl desktop -no-icu -skip qtwebkit
Everything was fine and the config program said "Qt is now configured for building. Just run mingw32-make."
When I execute as requested, it ran for minutes but result in a following error at the end.
mingw32-make[4]: Entering directory 'c:/Users/lmh/Desktop/proj/QT/qt5-real/qtbas
e/src/tools/moc'
g++ -Wl,--gc-sections -Wl,-s,--gc-sections -Wl,-subsystem,console -o ../../../bi
n/moc.exe .obj/release/moc.o .obj/release/preprocessor.o .obj/release/generator.
o .obj/release/parser.o .obj/release/token.o .obj/release/main.o -LC:/Users/lmh
/Desktop/proj/QT/qt5-real/qtbase/lib -lQt5Bootstrap -luser32 -lole32 -ladvapi32
-lshell32 -lz
C:/Users/lmh/Desktop/proj/QT/qt5-real/qtbase/lib/libQt5Bootstrap.a: could not re
ad symbols: Archive has no index; run ranlib to add one
collect2.exe: error: ld returned 1 exit status
Makefile.Release:100: recipe for target '../../../bin/moc.exe' failed
mingw32-make[4]: *** [../../../bin/moc.exe] Error 1
mingw32-make[4]: Leaving directory 'c:/Users/lmh/Desktop/proj/QT/qt5-real/qtbase
/src/tools/moc'
Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory 'c:/Users/lmh/Desktop/proj/QT/qt5-real/qtbase
/src/tools/moc'
Makefile:84: recipe for target 'sub-moc-make_first' failed
mingw32-make[2]: *** [sub-moc-make_first] Error 2
mingw32-make[2]: Leaving directory 'c:/Users/lmh/Desktop/proj/QT/qt5-real/qtbase
/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory 'c:/Users/lmh/Desktop/proj/QT/qt5-real/qtbase
'
Makefile:50: recipe for target 'module-qtbase-make_first' failed
mingw32-make: *** [module-qtbase-make_first] Error 2
Did anyone encounter similar problem before? I have used similar approach to compile source on Linux, I do not understand why it failed on Windows. I would be glad to know what is wrong with my approach. Thank you very much.