Find the answer to your Linux question:
Results 1 to 3 of 3
The MySQL function mysql_real_escape_string() example uses a function strmov() that I can't get g++ to compile when I use it. The doc's from MySQL say that strmov() is part of ...
  1. #1
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714

    MySQL strmov()

    The MySQL function mysql_real_escape_string() example uses a function strmov() that I can't get g++ to compile when I use it. The doc's from MySQL say that strmov() is part of the mysqlclient library so I should have access to it (shouldn't I). I haven't had any problems compiling my MySQL applications before this.

    Has anyone had this problem? do you know a solution?

    My solution was to write my own mystrmov() function. It seems to work fine but I would like to use the one MySQL created in case my function lacks some functionality.

  2. #2
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211
    I found this about strmov(). The link is: Re: Compilation problems.

    I took out the m_string.h file from include directive and I get the following
    error
    ----------------

    gcc -g Bug_Report.c -O -o TEST1 -I/usr/include/mysql -L/usr/lib/mysql
    -lmysqlclient -lnsl
    /tmp/ccWyxVrf.o: In function `main':
    /home/nicu/QA/Bug_Report.c:15: undefined reference to `strmov'
    collect2: ld returned 1 exit status

    ----------------

    Hope this helps

  3. #3
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714

    Helped somewhat

    The file m_string.h does have the prototype for the function strmov. Turns out its the C function strcpy, which is exactly what I used,so I guess your posting did settle that issue. As for compiling a MySQL application with strmov(), still no go. But at least I know that strmov is strcpy...Thanks for your interest Gerard4143

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...