I have a C++ application currently running on a Fedora build, and my customer has expressed an interest in changing providers to a system running CentOS 7. I grabbed the latest basic install from the website and installed OS7 on my VMWare system so that I could test things out before confirming that I could move the software over. It's important to note that I am no where near a linux expert so if there is something more that you need, I would need what the specific commands to run to get that information. With that said...
The original system is based on MySQL and OS7 now comes with MariaDB, which has created some challenges. In the past when we tried a much older version of CentOS, our code would not compile do to some security restrictions but... who knows what OS7 will do.. Gotta try and see, right? Anyway, I grabbed all of "the latest" using the developers group, full 'everything' from Maria, g++, etc.
I have a "build.php" file that I run that is setup as follows:
Code: Select all
#Your files to be compiled (.cpp only, seperated by space)#
$files = "core.cpp roomsclass.cpp";
#Library Directories (seperated by space)#
$libs = "-L/usr/lib64/mysql/ -L./ -lmysqlclient lib/liblua.a lib/liblualib.a";
#Include Directories (seperated by space)#
$incl = "-I/usr/include/mysql/ -Ilua/";
system("g++ $files $incl $libs 2> build.log");
The original 'libs' was pointing to /usr/lib/mysql/ but it seems that OS7 has placed them into the lib64 folder so I updated it to that location. When I attempt to compile, I get the usual warnings about some depreciated state code (which never caused any problems in the past) and then at the end I get
Code: Select all
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
I do have files and folders in the "build" folder, which are carried over from the Fedora machine, which could possibly need updated, or perhaps I need to point the compiler to the system folders. I honestly don't know. It's been years since I've had to make any changes...
Any suggestions would be deeply appreciated. Thanks kindly in advance.
Gary