Why doesn't curl-config --cflags print libcurl's header files directory? - c++

I'm trying to include libcurl in my c++ project, and so am trying to find where the header files are located, but running "curl-config --cflags" just prints an empty line, instead of any useful information. I do have libcurl installed, not only because curl-config is included in libcurl and doesn't throw an error when calling it, but running "sudo apt-get install libcurl4" tells me it's already installed, and is the latest version.
I've tried googling this problem but haven't found anyone else with the same issue, I've run "sudo apt-get upgrade libcurl4" and "sudo apt-get update" and still get the same issue, and I've run out of ideas. Does anyone know what the problem might be?
My operating system is Linux Mint Cinnamon. Let me know if you need other info. Thanks!

I believe S.M. found the answer, which in hindsight I should have tried. Apparently, my system already had the necessary header files in its default include paths, meaning there would be no path to include, hence the blank line. I probably should have tested this by seeing if my code completion software detected it, I would've saved the headache! :) For the sake of future programmers with this issue, here's the takeaway: test to see if a library is installed already first, THEN try to install it! Thanks S.M. for the help!

Related

Can't build with libusb. ‘_Atomic’ does not name a type

I am attempting to use libusb for a project and my C++ is rusty. I think I've resolved the dependencies for libtool and libdev on my ubuntu box, but now when I run, I get the following error.
/usr/lib/gcc/x86_64-linux-gnu/10/include/stdatomic.h:40:9: error: ‘_Atomic’ does not name a type
I found How to include C11 headers when compiling C++ with GCC?, but not sure how this helps me.
The problem appears to be in gcc somehow, but not sure how to go about fixing it. I'm using C++ 20 in CLion.
I'm running on Ubuntu and I had tried
sudo apt install libusb
to no avail. On a hunch I tried
sudo apt install libusb-dev
And it worked, so now I don't need to build it.
I need to remember to search for the library name if it isn't obvious.

Header Files not Working in CLion after Xcode update

Apple sent out an Xcode update today and little did I know it would mess with my all of my header files.
The header file I am attempting to use is time.h. I know the code if fully functional because an online C++ shell will run it fine but CLion is telling me Cannot find 'time.h'. When I attempt to run the program I receive the following:fatal error: 'wchar.h' file not found. This was odd because I was able to locate the wchar.h file.
As per this post, I have followed all the instructions to no avail. I have also checked the location of the Command Line Tools with xcode-select -p and received that they are in /Library/Developer/CommandLineTools, which seems to be correct. I have also checked that gcc is working and the correct version. Any time I try xcode-select --install at this point it just tells me that it is installed and check for updates if I think it is wrong. It also told me there were no updates.
The only other thing I can think of is that the compiler is also telling me the following:
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk' [-Wmissing-sysroot]
And after checking this directory, I noticed that my sdk is MacOSX 10.13 where the compiler was looking for 10.12. Also my SDK is just a 10 byte alias file that OS X tells me can't be found when I click on it?
I am really scratching my head on this one, I have re-installed Xcode already just as a last resort to no avail. Any help would be much appreciated.
You need to change the sdk your project is using. Go to your Target and look at the Build Settings. Set the Base SDK popup to "Latest Mac OS(...)" and you should be good to go.

dicom3tools compiles with missing application pbmtoovl

I've downloaded dicom3tools in Ubuntu apt-get install dicom3tools, but certain apps are not present.
I've downloaded the source and compiled according to directions on Ubuntu without errors. I have access to most of the apps in the kit, but some just seem to be missing or not compiling.
I need a working binary copy of the pbmtoovl tool from this kit.
Can anyone help me?
Do you know why it is missing?
Do I need to compile differently?
Do you have a copy of the pbmtoovl app pre-compiled?
There is no info on this anywhere on the web, I have nowhere else to turn.
Thanks in advance for any info on this.
Please please help me with this.....
I edited the proper file with a uid.
I ran
imake -I./config -DInstallInTopDir -DUsemyID
and everything looked fine.
make World.
make install
make install.man,
but still no rawtodc or pbmtoovl or any of the dicom creation tools. I really need these tools. Please let me know what I'm doing wrong. On Ubuntu 14 –
I am the author of the dicom3tools debian package. The explanation is given online here.
When you install a debian package, you are required to read the documentation. In this case the documentation was available on your system from:
$ cat /usr/share/doc/dicom3tools/README.Debian
So you'll need to follow the build instructions yourself (see INSTALL):
Edit config/site.p-def to set your UID root (a la UseClunieID, to be
selected with a UseXXXXID define on the imake command line).
NB. Don't ever use any UseClunie*ID or your instances
will conflict with mine !
./Configure
setenv IMAKEINCLUDE -I./config # only needed for suns
imake -I./config -DInstallInTopDir -DUseXXXXID
make World
make install # into ./bin
make install.man # into ./man
I finally did a fresh Ubuntu install, installed xutils, g++, gcc and ran the compiling instructions. It did not install, again, but this time I did have a new directory in bin ending in 'unknown' that miraculously contained all of the compiled binaries. I added that dir to the PATH and VOILA I can access all the tools from the command line....
It's still a problem, but I can now use pbmtoovl

How to get valid binary path for cppcheck?

I am trying to install cppcheclipse from this website:
http://code.google.com/a/eclipselabs.org/p/cppcheclipse/wiki/Installation
I have followed the instructions there, however, when trying to configure it, it says the there is no valid binary path.
My question is how to get valid binary path?
Thank you
Make sure you have installed Cppcheck.. if you haven't then do it.
To find where cppcheck is installed on Linux:
which cppcheck
On Windows the path is something like:
c:\program files (x86)\cppcheck\cppcheck.exe
You need to first download the cppcheck itself and then install it. On Linux it seems to require compilation - which I can't get to work on my Ubuntu at least.
EDIT: Got the cppcheck now via apt-get but it's rather old version 1.27. and Eclipse gives me an error with it.. It seems I would need at least 1.48. version of cppcheck to get it working..
Flawfinder, splint, rats are giving me on CL better results though so I'm not sure if the cppcheck is worth the trouble of getting it set-up.. of course it could be that 1.68 is better..

Boost "no such file or directory"

I'm trying to set up my Code::Blocks work environment on a new computer and I'm having some problems. It's been a long time since I first did this, and now when I open my major project Boost is causing me problems.
I'm fairly new to C++ still and fixing this type of problem is something I have limited experience with.
When I open my project and try to compile it, I get this error:
fatal error: boost/algorithm/string.hpp: No such file or directory|
At this part of one of my header files:
#include <boost/algorithm/string.hpp>
I placed the Boost v1.51.0 library at C:\boost since that is where I'd had it on my other computer. My project is set to search that directory for additional includes but it doesn't seem to be finding the files?
My project used an older version of Boost previously but I doubt that's an issue.
I'm not sure how difficult it is to debug this problem with this limited information so if there's anything else I can provide please let me know.
I'm using Code::Blocks, and have just set up minGW and Visual C++ 2010.
In Ubuntu use
sudo apt-get install libboost-dev
Ensure that you have installed boost-devel package
In Centos execute as root:
yum install boost-devel
then
root#centos6 /]# find / -name boost
/usr/include/boost
/usr/lib64/boost
[root#centos6 /]#