To avoid for another 5 hours, I'm posting here to hopefully resolve this silly issue once and for all. I'd appreciate if you could simply provide the full makefile I should use, and then explain what does what. I've been studying dissected examples for hours now and none of it's helped!
Here's my current version:
I'm trying to get a simple MySQL script for C++ working using the MySQL++ library. Obviously, it uses only main.cpp at the moment.
Include dependencies are
/usr/include/mysql/mysql_version.h (among other files)
/usr/local/include/mysql++/mysql++.h (among other files)
Library dependencies are
/usr/lib/mysql/libmysqlclient.so
/usr/local/lib/libmysqlpp.so
main.ccp has #include <mysql++.h>
mysql++.h has #include <mysql_version.h> (among other mysql files)
This current setup produces
with more similar errors. However, the mysqlpp namespace is clearly defined in /usr/local/include/mysql++/mysql++.h
I figure this should be a simple fix. Thanks for your help!
It looks like you've listed the search directories for libraries (-L), but not the libraries them selves. For example, if you need to link with the mpeg2 library, you'd also have -lmpeg2 on your command line.
Assuming from your post that you need libmysqlclient.so and libmysqlpp.so the first thing I'd do is to change your LIB variable to be:
I prefer a space between the L and library name, but I have worked in some environments that require them to not be separated, so you might have to adjust that too.
WOW. Yes, that was the problem. I did mess with specifying the library directly, but nothing told me that you only specify the middle part of the filename... how annoying. Thanks so much!
So basically out of libanything.so.999.0.2, you only provide -lanything
I'm definitely not going to mess that up again, considering how much time this has taken up.
WOW. Yes, that was the problem. I did mess with specifying the library directly, but nothing told me that you only specify the middle part of the filename... how annoying. Thanks so much!
So basically out of libanything.so.999.0.2, you only provide -lanything
I'm definitely not going to mess that up again, considering how much time this has taken up.
Glad that worked. You might want to have a read through the linker man page (man ld).
Hi everyone I installed OpenSuse 12.3 and many development tools but when i propose build the kernel from the source (the first step make menuconfig) i saw this:
HOSTLD scripts/kconfig/mconf
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libdl.so.2,... (2 Replies)
I hope this is the right place to post this and that I can get some help. I pretty much suck at troubleshooting build issues.
we are running oracle red-hat linux 2.6.32-200.20.1.el5uek #1 SMP Fri Oct 7 02:29:42 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
trying to build the latest stable version of... (3 Replies)
I am trying to compile some code and getting lot of errors
g++ -traditional -Wno-non-template-friend -Wno-deprecated -O3 -DNDEBUG -DREAL=float -DGetREAL=Getfloat -IbaseLib -Itommy -Iothers ./source/main/RayTrac.cc -o raytrac
./source/main/RayTrac.cc:36:20: error: gendef.h: No such file or... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Hey,
I'm trying to install DigSig ( disec.sourceforge.net ) on my CentOS5 distro. I was following all the steps in the readme but it didn't work. So here's the output:
# ./digsig.init compile
make: Entering directory `/usr/src/kernels/2.6.18-194.32.1.el5-i686'
CC ... (2 Replies)
I use Ubuntu 10.4, and I installed GNUStep, Gorm (a gui builder) and ProjectCenter (the GNU alternative to Xcode) because I want to develop Objective-C apps. I opened the ProjectCenter and I created an application that displays only an empty window. I sourced the GNUstep.sh and I compiled the app. ... (0 Replies)
Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error:
make: module: command not found
Why is this? Is there any way to run this command in a Makefile?
NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Hi, i'm trying to work with a trial version of PurifyPlus 7 with fixpack 10 from Rational that needs to run over an AIX 5.3 platform, 64-bit. I had success on compiling and running the hello_world programs and even a hash test program i found over the net, but purify can achieve the same with the... (0 Replies)
Hi everyone. I'm a newbies in using c++ in UNIX. And since then I only do maintenance coding not development. so far i understand c++ coding and OOP concepts.
currently i'm working onsomething for maintenance purpose.here's the situation :
below are my files :
source files:
advDisc.cpp ... (2 Replies)