iostream file not found in xcode 5 - c++

I am using ZXing library with version 2.2 for QRCode scan on xcode version 5.0.2
One of the file named "Counted.h" contains #include .
All the libraries are added and header path is also set as mentioned in different questions.
I have a ZXing integrated stand alone project which is compiling successfully but facing errors when trying to integrate with my project.
It is showing an error "'iostream' file not found" on building the project.
I am also using Tesseract and SQLCipher libraries.
Probably there is some issue in build settings.
Can anyone tell me if I am missing out anything??

Related

Including TensorFlow into JUCE project

I am trying to include the TensorFlow C Library in my JUCE project. Until now, with no luck.
When following the TensorFlow guide on how to install the library for C I get lost after the extraction part (developing with Windows). I Add the files inside the include folder to my project using the Projucer. The library with the dll and lib file is added as well. When running Visual Studio, however, there are some includes not inside the provided include folder. My guess is, that I need to link the included library with the full TensorFlow blackened.
Did anyone manage to include TensorFlow inside a JUCE project?
Tutorials I've looked at already:
https://www.tensorflow.org/install/lang_c
https://forum.juce.com/t/has-anyone-managed-to-integrate-tensorflow-api-in-a-juce-project/28019
How to use the tensorflow 2.0 C API?

Linking libjpeg to an xCode project for iOS dev

Good evening,
I have been working on a C++ project from someone of my University which I had to improve for my Bachelor thesis. It basically uses the library libjpeg to do some computation resulting in a steganographic process in order to embed a message into a given image.
Now that the C++ code works smoothly, I'd like to create a little iOS app allowing the user to encrypt whatever message he'd like into an image of his choice. So I created an xCode project following this procedure: using c++ in an iOS app
I also found the following file: libjpeg for iOS which allowed me to compile libjpeg for iOS. Since I'm not so sure how to use the framework freshly created and couldn't find anything sufficiently convincing on the internet, I put all the files (.c and .h) of the libjpeg library into my "include" folder where I have my own .hpp.
xCode only throws me the following error:
xCode error
From what I could gather on several posts, I have to modify the build options of my xCode project to link manually the library, so I tried the following:
Other linking flags
Library search path
This wasn't enough to do the trick and I'm still struggling with the same error xCode throws at me. Any help would be very appreciated on how to proceed!
Thanks a lot,
Theo.
Do not add the .c files to your project, add the libjpeg.a file produced by your build to your project. Add the .h files as you are already doing, or edit the project settings to include their containing folder in the search path.
HTH

Compiling SDL-based app in Xcode 5 fails, 'SDL.h' file not found

Today I came across a copy of SAIS that has been mouldering on my HD for some time, and found that it no longer works - PPC target! I downloaded the source, which is C++ that uses SDL to build a Windows binary. SDL should make it somewhat portable...
Under Xcode 5.1.1 I made a new Command Line Tool application and selected C++ as the language. Then I copied all the source over to the new project, along with the SDL2.framework that I downloaded.
Then I made a target for my machine. I went to my Build Phases and added SDL2.framework to the Link Binary With Libraries step, and added it to the Copy Files step as well. I then added the header folder inside the framework to my Header Search Path.
Did I miss anything here? Because when I build I get 'SDL.h' file not found. Yes, that file is in the framework.

Cannot build an opengl es 2.0 c++ native android project. (fatal error: android/sensor.h: No such file or directory)

I try to build a book samples. (http://www.apress.com/9781430258308 , full source code can be download from there. I tried to build the very first code.)
I downloaded and installed the latest android sdk,adt and eclipse. I installed Sequoyah in Eclipse. I use android NDK r8c instead of the latest NDK because I got an 'Invalid path for NDK' error when I tried to set the NDK path in Eclipse.(Preferences/Android/Native Development/NDK Location)
I use MiniGW for c++ compiler.(I used this guide ( http://riccardotramma.com/2011/04/setup-eclipse-to-develop-opengl-glut-apps-in-java-cc-on-windows-mac/ ) to setup MiniGW in Eclipse. Just the MiniGW part.) I use MiniGW instead of Cygwin because I always get a 'unexpected end of file' error at some point of the build process.
I also added some include path and library (java and opengles) to the project at Properties/C/C++ General/Paths and Symbols. If I don't do this I get a 'fatal error: jni.h: No such file or directory' error and I would get additional errors for the further .h declarations.(egl.h etc.)
Now I just get the 'fatal error: android/sensor.h: No such file or directory' error (this is the first android .h declaration and probably I would get more errors for all of the android specific .h files later in the code.
I noticed one thing. There is a red x near $(call import-module,android/native_app_glue) line in the Outline window. Everything else seems fine.
If you can successfully build the above examples ( you can download it freely) please let me know your exact configuration or please guide me how to build my first native opengl code. (sdk,ndk versions etc.)
Thanks in advance,
Steve
Here's some quick points:
You can't use MinGW as the C++ compiler to work on Android NDK projects. The Android NDK has it's own specific compiler/toolchain. If you right-click on your project in Eclipse and go to C/C++ Build > Tool Chain Editor. The current toolchain should be Android GCC.
If you are getting unexpected end of file errors, could it be that some of the code has unix/linux style line endings? Here is an example of that (with the solution of using a text editor to make sure all the end lines are Windows/DOS format) - http://connect.microsoft.com/VisualStudio/feedback/details/794991/c-error-directive-and-unix-line-endings-leads-to-an-unexpected-end-of-file
You need a Application.mk file in the same directory as Android.mk.
This Application.mk file should contain a string similar to APP_PLATFORM: = android-9.

setting up sfml

I'm following the sfml getting started guide for version 2 and codeblocks and did everything the tutorial told me to do :
downloaded and unzipped the sdk
added the path to the sfml headers and libraries
linked the libraries graphics, window and system
but the sample code doesnt work. I'm getting the error message that sfml-graphics-d-2.dll is missing. Compilation works, the window opens but remains black and this error pops up.
Here's the link to the tutorial
http://www.sfml-dev.org/tutorials/2.0/start-cb.php
Since Im new to c++ and codeblocks, I would be grateful for a detailed answer.
UPDATE:
I have copied the SFML dlls to the executable. Now my program just crashes. I don't know why. It's the exact same code as used in the tutorial.
UPDATE:
I have changed the linked libraries to the -s version and added the #define SFML_STATIC. The program still builds and then crashes
If you're using the latest Code::Blocks version, which includes GCC 4.7.1, then you have to recompile SFML on your own (or use my Nightly Builds), because the ones provided are only for GCC versions < 4.7.x.
It seems you aren't setting up your static libraries to be built inside the project, and instead using dynamic linking with your SFML. I had a similar problem when setting up SFML a couple months ago, recall this quote:
The settings shown here will result in your application being linked to the dynamic version of SFML, the one that needs the DLL files. If you want to get rid of these DLLs and have SFML directly integrated to your executable, you must link to the static version. Static SFML libraries have the "-s" suffix: "sfml-xxx-s-d" for Debug, and "sfml-xxx-s" for Release.
In this case, you'll also need to define the SFML_STATIC macro in the preprocessor options of your project.
make sure you include the static files in your project
sfml-graphics-s-d //for debug
sfml-window-s-d //d for debug!
sfml-system-s-d
for release, omit the d (sfml-graphics-s)
Next go to Compiler settings -> #Defines and type
SFML_STATIC
Regarding Visual Studio 2017 and SFML-2.5.1, I suggest this tutorial. Setting up SFML is similar to setting up SDL, GLFW, freeGLUT, and GLEW, with two peculiarities: .lib files are 29, and .dll are 11. Briefly I suggest:
1. Upload SFML and select first "Download". Copy downloaded folder and paste in a folder you created in C:.
2. Create Empty Project.
3. Configure "Additional Include Directories" with C:...\SFML-2.5.1\include.
4. Configure "Additional Library Directories" with C:...\SFML-2.5.1\lib.
5. In "Additional Dependencies" window copy and paste: flac.lib; freetype.lib; ogg.lib; openal32.lib; sfml-audio.lib; sfml-audio-d.lib; sfml-audio-s.lib; sfml-audio-s-d.lib; sfml-graphics.lib; sfml-graphics-d.lib; sfml-graphics-s.lib; sfml-graphics-s-d.lib; sfml-main.lib; sfml-main-d.lib; sfml-network.lib; sfml-network-d.lib; sfml-network-s.lib; sfml-network-s-d.lib; sfml-system.lib; sfml-system-d.lib; sfml-system-s.lib; sfml-system-s-d.lib; sfml-window.lib; sfml-window-d.lib; sfml-window-s.lib; sfml-window-s-d.lib; vorbis.lib; vorbisenc.lib; vorbisfile.lib
6. Navigate to C: > ... > SFML2.5.1 > bin. Copy all 11 dll files and paste in project-folder.
Good job. Regards.