This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MySQL Connector/C API_First test

Other Parts Discussed in Thread: EK-TM4C1294XL

Hello, I am using an EK-TM4C1294XL and I am trying to connect this board to a remote server in order to run HTTP requests, hopefully so I can download a certain table from my database into an ordinary table declared in C. Seeing as this is the first time working with this API, I started with a very simple code that should print out the version of the connector/C API that I have installed. I am using the GNU v4.8.4 (linario) compiler installed in the free version of CCS6.

OS system: Windows 10 64-bit

project_mysqlTEST.zip

#include <my_global.h>
#include <mysql.h>

int main(int argc, char **argv)
{
  printf("MySQL client version: %s\n", mysql_get_client_info());

  exit(0);
}

When I downloaded the zip version of the API, all I did was unzip into the directory I wanted. My first question before proceeding is how do I properly ensure that the API is installed? And do you think I should upgrade the GNU compiler, if so, how do i do this in CCS ? I will then continue to try and debug before asking further questions.


As you can tell I am a beginner so please keep responses as basic as possible, or even better, visual.

Thank you for any help in advance

Best Regards

Jean

  • Jean,

    user4236820 said:
    My first question before proceeding is how do I properly ensure that the API is installed?

    I don't necessarily know what MySQL SDK/component you are using but, unless this SDK is based on RTSC/SDC (similarly to TI-RTOS, etc.), in general simply unzipping and adding the include directories to the compiler options and library directories and .lib files to the linker options of your project should be enough for it to be properly used by your code. To access the project properties check section 4.2 of the page below:

    http://processors.wiki.ti.com/index.php/Projects_and_Build_Handbook_for_CCS

    user4236820 said:
    And do you think I should upgrade the GNU compiler, if so, how do i do this in CCS ?

    Unless the MySQL SDK explicitly specifies a GCC version, I don't necessarily see the need to update the compiler. If you see the need, you can always check section 4.10 of the same page above.

    Hope this helps,

    Rafael