How to get started with twitCurl? - c++

I am trying to use twitCurl and I am following instructions given on
[1]: http://code.google.com/p/twitcurl/wiki/WikiHowToUseTwitcurlLibrary under the Unix/Linux section.
Getting stuck while doing
g++ twitterClient.cpp -ltwitcurl
It gives an error message
In file included from twitterClient.h:4:0,
from twitterClient.cpp:1:
includes/twitcurl.h:8:23: fatal error: curl/curl.h: No such file or directory
compilation terminated.
The file curl.h is inside curl/ but it still gives an error.
Why?

Add -I<path to curl/curl.h> to your building command.

Related

cc1plus.exe: fatal error: world.cpp: No such file or directory compilation terminated

i have problem with the code
everytime the code is done, running the code is still normal. when exiting visual code studio and re-entering, the code does not run end show the error as below
cc1plus.exe: fatal error: world.cpp: No such file or directory
compilation terminated.
I also got the same error, and to fix the error is easy. It may because your file name contains spaces. More information about this and how I know this is here:https://www.youtube.com/watch?v=Z5QxAjaiQp8. (Altough he got the different error raised but the way to fix it is still the same).
I resolved the error by removing the spaces between the name of the file I was saving. Earlier I was naming my c++ file as example- "test file.cpp", but when I removed the blank space i.e. "testfile.cpp" or "test_file.cpp", the error resolved.
If you are compiling the code using your terminal, you could check if the file you want to run is in that folder using dir for Windows or ls for Linux. If it is not, change to the folder where the file is and try running the file again.

How to add sys/mman.h to MinGW in Windows?

I'm trying to use the following tool: Extract Loudest Section in Windows.
I used the following command line to run main.cc g++ -o main main.cc
But I've got this message: "fatal error: sys/mman.h: No such file or directory"
However, I read this answer, but I still need more details about how to add the needed files correctly to my compiler?
The "Downloads" page in the link provided by the answer shows:
There was an error getting resource 'downloads':
401: Anonymous caller does not have storage.objects.get access to google-code-archive/v2/code.google.com/mman-win32/downloads-page-1.json.
So, I found this as an alternative resource.

fatal error: winsock: No such file or directory

I have been trying to compile multiple C and C++ scripts on a kali VM and 99% of the time I get an error like this:
test.cpp:39:10: fatal error: winsock: No such file or directory
#include <winsock>
It will do the same for Iostream too, I cannot find anything that has helped me fix this and I need to be able to comple and run these programs.
You need to download and install the sdk platform

Gpp error : no such file or directory

I am trying to compile and run my basic c++ code in Atom .
But it shows an error like
gpp error : No such file or directory.
I was referring stack overflow and got some ideas to solve like Adding path of compiler and removing ".h" from "iostream.h".. but failed please help !!
here is the code
enter image description here
here is the error msg :
"g++: error: gpp: No such file or directory
g++: error: compiler: No such file or directory "
thank you for answering ..

fatal error: 'ext/hash_map.h' file not found on Mac

I run some downloaded code using hash_map.h. But when I compile it using g++, it gives error message:
fatal error: 'hash_map.h' file not found
I search on google, some one suggests to replace 'hash_map.h' by 'ext/hash_map.h' and add 'using namespace __gnu_cxx;'. But still I get the error message 'fatal error: 'ext/hash_map.h' file not found'.
I type "sudo find / -name hash_map.h" in the terminal of my Mac, and get the following results.
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/c++/4.2.1/backward/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/c++/4.2.1/debug/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/c++/4.2.1/backward/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/c++/4.2.1/debug/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/backward/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/debug/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/c++/4.2.1/backward/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/c++/4.2.1/debug/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1/backward/hash_map.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1/debug/hash_map.h
How to link hash_map.h to the downloaded code?
I add the path to the hash_map.h to the Makefile as follows.
g++ -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1/ -c target.cpp
And I replace 'hash_map.h' by 'debug/hash_map.h', and add 'using namespace __gnu_cxx;'.
It works for me.