This was the most appropriate place that I saw to post a C build system question that I saw so, sorry if there is a better place that I missed. Anyhow, I have run into an issue running configure where the linker is not finding the library that I'm specifying. I'm down to guesses so, any direction would be helpful. The configure command that I've constructed is below but, basically, I'm using LDFLAGS to point to the .so file that resides in a non-standard location. I'm using CFLAGS to point to the includes directory where the header files reside and LIBS to indicate the library that I'm using. There is another directory /usr/local/bin that contains three binaries that I don't know how to specify with the configure command. I'm trying to build GNU TLS from source after installing Nettle from the source files as well. Thank you in advance!
You don't say whether make completes successfully or not. The compiler flags given tell the compiler where to find the pieces to buld the program. If the compile has completed successfully, but when you try to run the program you get a message
"error while loading shared libraries: <libname.so>: cannot open shared object file: No such file or directory
then the problem is at runtime, not compile time. As Randor notes, you can tell the link-loader where to find the library with LD_LIBRARY_PATH
You can add that to your shell's .profile file. and it will be set every time you log in. If you want to set this up permanently for all users ont the system, then as root create a file /etc/ld.so.conf.d/local.conf containing the single line
Now, as root, run ldconfig, and you should be able to run your program from any login, without needing to set LD_LIBRARY_PATH in your .profile or per session/per command.
you can check what libraries are being loaded using the ldd command
I am trying to learn factory design pattern in c++, writing a program with separate header files and their class implementations in .cpp files. But i am facing problem. I was trying the ShapeFactory from where we implement Circle and Rectangle.
invalid new-expression of abstract class type 'Circle'
invalid new-expression of abstract class type 'Rectangle'
But i am getting these errors and also few other errors. Can someone please help on this.
Why would the calling function have anything to say?
Quote Selected Text
With very high probability the calling code is wrong (possibly making incorrect assumptions on the called function, it passes the wrong type). Maybe a previous implementation of the library had relaxed checks on calling code correctness.
"In testa che avete, Signor di Ceprano?"
Your compiler should have an option to send the output of the preprocessor into a file. Using Visual C/C++, this option is /P, and the output file has an extension of .i .
Run your code through this, and look for cmath.h in the .i file. Then look for the definition of the round() function. You will see what the compiler thinks the round() function is, and your problem should then be obvious.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
If your code looks exactly like posted, compiler will slap you with an error on bData2 line because you don't have a default constructor. You can:
1. Modify the constructor to default to an empty string: BillingDates(std::string InputFile = std::string()) and handle the case when InputFile is the empty string.
2. Create an additional default constructor: BillingDates()
If you need to move data from bData to bData2 you might need a copy constructor: BillingDate (const BillingDate& other).
Last Visit: 31-Dec-99 19:00 Last Update: 5-Mar-21 16:46