MySQL C API Header File Problems

This is a discussion on MySQL C API Header File Problems within the C Programming forums, part of the General Programming Boards category; Hi All, I am currently an electrical engineering student and I am working on a project. My background is more ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    3

    MySQL C API Header File Problems

    Hi All,

    I am currently an electrical engineering student and I am working on a project.

    My background is more hardware, but I find myself currently doing some software work.

    I need a C program to be able to read in values from a MySQL table on another machine. I have installed MySQL and used the MySQL header file.

    “#include <mysql.h> ”

    However, when I compile the program I receive a series of messages:

    “Could not find sys/types.h Would you like to look for it?”
    “Could not find features.h Would you like to look for it?”
    “Could not find sys/cdefs.h Would you like to look for it?”
    Ect…


    I went online and found .txt versions of many of these header files, but I think there must be an easier way to solve this problem. I have not been involved with software for quite some time and could use a little help.

    Looked through some other threads but couldn't find anything. Any ideas on what I am doing wrong?

    Regards - Robby

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Let me guess: You are using a Unix version of mysql.h on a windows machine?

    You probably need to INSTALL the correct version of mysql development package on the particular machine you are working on.

    It could be something else, but since you don't give any details to disprove my guess, I'm guessing that's the problem.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    3
    Ahhhh... Mats you are a life saver.

    Feel like quite the idiot now.

    Appreciate the help.

    -Robby

  4. #4
    Registered User
    Join Date
    Mar 2009
    Posts
    3
    Mats,

    Here is some more information about what I am doing, I made sure the version I installed was for windows, but I am still getting the same problem.

    Here is a bit more information about what I am trying to do.

    My OS is Windows XP.

    I installed MySQL using mysql-5.1.32-win32.msi

    I used the custom installation to include all of the developer package and I also used the developer configuration.

    During the configuration I received a MySQL.Error: 0, which I have yet to be able to fix.

    I am writing and compiling the C code in LabWindows CVI.

    I use #include <mysql.h> (which does exist in the folder created during installation).

    However, other library files such as "sys/types.h" and "features.h" cannot be found.

    I am still up able to use the MySQL C API.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems passing a file pointer to functions
    By smitchell in forum C Programming
    Replies: 4
    Last Post: 09-30-2008, 02:29 PM
  2. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. mysql c api problems
    By rotis23 in forum C Programming
    Replies: 0
    Last Post: 10-07-2002, 04:15 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21