NDK Build for CoolReader - build

Im new to NDK, Installed cygwin and added to path folder too. From eclipse when tried to build by project contextmenu>build configuration>build selected got the below error in the console. What is lvstring.h . Im using windows 7, java 7, eclipse indigo
**** Build of configuration Default for project CoolReader ****
E:\exe\android-ndk-r8b\ndk-build.cmd all
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbserver
Gdbsetup : libs/armeabi-v7a/gdb.setup
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Gdbserver : [mipsel-linux-android-4.6] libs/mips/gdbserver
Gdbsetup : libs/mips/gdb.setup
Gdbserver : [x86-4.6] libs/x86/gdbserver
Gdbsetup : libs/x86/gdb.setup
"Compile++ thumb : cr3engine-3-1-0 <= cr3engine.cpp
In file included from jni/cr3engine.cpp:15:0:
jni/cr3java.h:18:22: fatal error: lvstring.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi-v7a/objs/cr3engine-3-1-0/cr3engine.o] Error 1
**** Build Finished ****

the problem is fixed, seems to compile the native codes some lib from parent folder of project is required.
actually there are some lib files in repo which is not inside the project folder but outside it. so ndk build threw error, once it was changed it compiled by taking all dependency

Related

Trying to build mysql-connector-cpp on Windows

I want to be able to build mysql-connector/c++ applications in debug mode (VS2k17), and understand the only way I can do that is to first build mysql-connector-cpp from source on my computer (Windows 10/64bit). I tried the following:
cmake . -DWITH_SSL=C:\Users\Rawb\source\libraries\OpenSSL-Win64
and it looks to complete successfully ...
Install location: C:/Users/Rawb/MySQL/MySQL Connector C++ 8.0
Connector libraries will be installed at: lib
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Rawb/source/repos/mcc2/mysql-connector-cpp
but when I run the following cmake build ...
cmake --build . --config
it fails with this output ...
LINK : fatal error LNK1104: cannot open file 'ssleay32.lib' [C:\Users\Rawb\source\repos\mcc2\mysql-connector-cpp\connector.vcxproj]
Done Building Project "C:\Users\Rawb\source\repos\mcc2\mysql-connector-cpp\connector.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\Users\Rawb\source\repos\mcc2\mysql-connector-cpp\ALL_BUILD.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Rawb\source\repos\mcc2\mysql-connector-cpp\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\Rawb\source\repos\mcc2\mysql-connector-cpp\connector.vcxproj" (default target) (10) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ssleay32.lib' [C:\Users\Rawb\source\repos\mcc2\mysql-connector-cpp\connector.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:14.57
What might I be doing wrong? Do I just need to place the ssleay32.lib file somewhere? I do have a copy of it but not sure how it should be included. Or is it more complex? I.e. Do I need to build Open SSL first on my machine as well? This is a deep rabbit hole for me, I may be in over my head haha!
NOTE: I also asked this question on reddit with no luck, so hoping someone here might know.
If you're using MSVS (any version, including MSVS 2017), then I'd suggest using "NMake" (instead of cmake). Or just create a new C/C++ library project in the MSVS IDE.
The flag you're looking for is /LIBPATH. I don't think you need "-D", but you certainly need "/LIBPATH".
Here are the MSVS linker options:
https://learn.microsoft.com/en-us/cpp/build/reference/linker-options?view=vs-2017
Finally, you might be able to do all the troubleshooting/tracing you want without actually debugging (and rebuilding) the connector code.
Here's how to enable tracing in the MySQL Connector:
https://dev.mysql.com/doc/connector-cpp/1.1/en/connector-cpp-debug-tracing.html
Please let me know if this helps.

Qt Creator project using CMake : Issues removing files

So here's a quick (and probably inane) question from someone new to CMake and Qt.
I'm currently using Qt Creator, alongside of CMake, to create some project. I have 2 C++ files that I have to remove that are no longer used anywhere within the codebase. I have removed them from the project, the CMakeLists.txt file, nuked the build and qt_build directories, and proceeded to try to rebuild. However, I seem to be getting an warning when running qmake which looks like this...
15:03:03: Running steps for project Traveler...
15:03:03: Starting: "C:\Qt\5.9.2\msvc2017_64\bin\qmake.exe" C:\Users\someone\Traveler\Traveler.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug"**
Info: creating stash file C:\...\build-traveler-Desktop_Qt_5_9_2_MSVC2017_64bit-Debug\.qmake.stash
WARNING: Failure to find: src\XX_Exceptions.cpp
WARNING: Failure to find: include\XX_Exceptions.hpp
WARNING: Failure to find: src\XX_Exceptions.cpp
WARNING: Failure to find: include\XX_Exceptions.hpp
15:03:07: The process "C:\Qt\5.9.2\msvc2017_64\bin\qmake.exe" exited normally.
15:03:07: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe" qmake_all
It seems as if qmake exits without error, but I really don't like seeing these compiler warnings (especially duplicated, so its showing up in two places).
Then, when I proceed to try to build...
15:16:27: Running steps for project Traveler...
15:16:27: Configuration unchanged, skipping qmake step.
15:16:27: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe"
C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
Error: dependent 'src\XX_Exceptions.cpp' does not exist.
jom: C:\Users\someone\build-Traveler-Desktop_Qt_5_9_2_MSVC2017_64bit-Debug\Makefile [debug] Error 2
15:16:28: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project Traveler (kit: Desktop Qt 5.9.2 MSVC2017 64bit)
The kit Desktop Qt 5.9.2 MSVC2017 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"
Question :: Is there any location where the specific files in the project are referenced besides the CMakeLists after I nuke the build directories?

VisualGDB Embedded Project Error

I am using VisualGDB to build an Emedded Project using Visual StudionCommunity 2013. I chose STM32F4xxxx as my device type. I am getting the below error while doing, clean, build or rebuild
Error 6 error MSB3073: The command ""\VisualGDB.exe" /rebuild "C:\MyWork\experiments\Embedded\EmbeddedProject1\EmbeddedProject2\EmbeddedProject2.vcxproj" "/solution:C:\MyWork\experiments\Embedded\EmbeddedProject1\EmbeddedProject1.sln" "/config:Debug" "/platform:ARM"" exited with code 9009.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 43 5 EmbeddedProject2
I had the same error and my problem was that I had not the beginning of a path in my makefile (I had just ".../NameOfTheLib" and I replace by "C:/Documents/...AllMyPath/NameOfTheLib") and now it works and I can send my project by SSH.

Unknown errors in makefile in Qt application

I did some changes like copying .dll (libmysql.dll) in project directories, and included include and libs path in mysql.pro. So now when I debug any program I get some error as follows:
'cl' is not recognized as an internal or external command, operable
program or batch file. jom:
D:\qt_projects\build-zerocopy-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug\Makefile.Debug
[debug\main.obj] Error 1
'cl' is not recognized as an internal or external command, operable
program or batch file. jom:
D:\qt_projects\build-zerocopy-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug\Makefile.Debug
[debug\client.obj] Error 1 jom:
D:\qt_projects\build-zerocopy-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug\Makefile
[debug] Error 2 10:48:01: The process
"D:\QT\Tools\QtCreator\bin\jom.exe" exited with code 2. Error while
building/deploying project zerocopy (kit: Desktop Qt 5.0.2 MSVC2010
32bit) When executing step 'Make' 10:48:01: Elapsed time: 00:01.
Is this error because of those changes? I am running a totally different program i.e I haven't included any sql header or anything. Please help me out.
Check my Tool Chains:
The important thing is the call of "C:\Program Files...vcvars32.bat" which is called as initialization. This batch file extends the PATH variables and does some other things so the calls of cl.exe and link.exe etc work. Maybe you can manually configure something like that as well. In my case, Qt Creator just auto-detected it and it has always been there.
Note that these settings are for Windows XP 32bit with Visual Studio 2008

gdbinit "no such file or directory" Eclipse c

I'm using Xming to connect to a Linux (enterprise edition) server on which I'm trying to debug a C++ project in Eclipse Galileo. The following errors occurred:
Reading symbols from ../workspace/myfile ..(no debugging symbols found) ... done.
.gdbinit : No such file or directory
Setting environment variable "LS_COLORS " to null value
(.gdbinit is on the server (in root), my account has rights)
If i try to run gmake on the same file from the terminal I get the following error :
gmake ** No rule to make target /workspace/myfile' . Stop.
//I have exported the path (including the library path), and gmake exists.
My project has 3 subprojects (proj1 , proj2 and proj 3). In order to debug proj3 I have to build projs 1 and 2 . I created make targets for projects 1 and 2, and I obtained .so files for which i made softlinks to corresponding files in my_project/libs folder.
My Eclipse debug configuration is as follows (tab order):
Main
  Project: My Project
  Build Configuration: UseActive
  C++ Application: path to my project/myproject
  Environment: path to libs on server (my user rights)
Debugger
  Debugger: gdb/mi
  (Checked) Stop startup at main
  GDB debugger: gdb
  GDB command line .gdbinit
  GDB command set: standard
  Protocol mi
Project Properties:
  Builders CDT Builder
  Scanner Configuration Builder
  C/C++ Build
  Build command gmake -k
Behaviour
  build incremental build : all ( sometimes i get the error no rule for make all)
  Clean: clean
  Discovery options:
    (Checked) Automatic discovery path
    (checked) Report path detection problems
    Discovery profile GCC per project
    (checked ) Enable build output
    Compile invocation comand gcc
    Toolchain
    No toolchain
    Correct builder GNU make builder
This Eclipse debug configuration works on another account (on the same server using the same Eclipse). The gdbinit and gmake files are on the server and work, I'm not supposed to update the versions (this was one solution I found online).
Has anyone seen this error before? Does anyone have a clue what I'm doing wrong?