Help with error

This is a discussion on Help with error within the C Programming forums, part of the General Programming Boards category; I am not a C programmer, but needed to modify a line on a 'C' source file. When I try ...

  1. #1
    Unregistered
    Guest

    Help with error

    I am not a C programmer, but needed to modify a line on a 'C' source file. When I try to compile this file, I get errors relating to a header file (sqltypes.h) thats included and supplied by the compiler. Can anyone help? Here are the errors:

    sqltypes.h(114) : error C2061: syntax error : identifier 'SQLHWND'
    sqltypes.h(114) : error C2059: syntax error : ';'
    sqltypes.h(252) : error C2061: syntax error : identifier 'DWORD'
    sqltypes.h(253) : error C2061: syntax error : identifier 'Data2'
    sqltypes.h(253) : error C2059: syntax error : ';'
    sqltypes.h(254) : error C2061: syntax error : identifier 'Data3'
    sqltypes.h(254) : error C2059: syntax error : ';'
    sqltypes.h(255) : error C2061: syntax error : identifier 'Data4'
    sqltypes.h(255) : error C2059: syntax error : ';'
    sqltypes.h(255) : error C2059: syntax error : '['
    sqltypes.h(256) : error C2059: syntax error : '}'

    Thanks!!!

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Is this the same compiler that the program was written on?

    -Prelude
    My best code is written with the delete key.

  3. #3
    Unregistered
    Guest
    No. I am using a Visual C++ compiler. How do I find out what compiler was used to compile this file? Thanks for you help.

  4. #4
    Idiotman
    Guest
    Sounds like you most likely re-defined some things already defined in the header file; best bet is to open it up and study what it does and what it expects and make your program match it.

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    I noticed that sqltypes.h uses macros defined in windows.h for some of it's own macros. After a quick test I get the same errors if I fail to include windows.h sometime before sqltypes.h. Try doing that and see if it fixes the problem.

    -Prelude
    My best code is written with the delete key.

  6. #6
    Unregistered
    Guest

    Question

    Prelude,

    Thanks for your help. Including windows.h did resolve the above problem. But now I am getting different errors. I am trying to compile this C file w/MS Visual C++. Do I need to change some settings on the compiler?

    --------------------Configuration: BasketHdr - Win32 Debug--------------------
    Linking...
    BasketHdr.obj : error LNK2001: unresolved external symbol _E_Array
    BasketHdr.obj : error LNK2001: unresolved external symbol _errmsg
    BasketHdr.obj : error LNK2001: unresolved external symbol _getVal_ini
    BasketHdr.obj : error LNK2001: unresolved external symbol _sqlcxt
    BasketHdr.obj : error LNK2001: unresolved external symbol _sqlorat
    BasketHdr.obj : error LNK2001: unresolved external symbol _get_debug
    BasketHdr.obj : error LNK2001: unresolved external symbol _rtrim
    BasketHdr.obj : error LNK2001: unresolved external symbol _app_ini
    BasketHdr.obj : error LNK2001: unresolved external symbol _iniget
    BasketHdr.obj : error LNK2001: unresolved external symbol _getval
    BasketHdr.obj : error LNK2001: unresolved external symbol _sqlbuft
    BasketHdr.obj : error LNK2001: unresolved external symbol _Csequence
    BasketHdr.obj : error LNK2001: unresolved external symbol _file_to_web
    BasketHdr.obj : error LNK2001: unresolved external symbol _reset_ini
    BasketHdr.obj : error LNK2001: unresolved external symbol _splitinput
    BasketHdr.obj : error LNK2001: unresolved external symbol _mime_hdr
    BasketHdr.obj : error LNK2001: unresolved external symbol _upperstring
    BasketHdr.obj : error LNK2001: unresolved external symbol _cgi_getValLimited
    BasketHdr.obj : error LNK2001: unresolved external symbol _cgi_getValPtr
    BasketHdr.obj : error LNK2001: unresolved external symbol _getLnbr
    BasketHdr.obj : error LNK2001: unresolved external symbol _get_app_abbrev
    BasketHdr.obj : error LNK2001: unresolved external symbol _getvaln
    BasketHdr.obj : error LNK2001: unresolved external symbol _replacech
    BasketHdr.obj : error LNK2001: unresolved external symbol _ltrim
    BasketHdr.obj : error LNK2001: unresolved external symbol _cgi_getMultipleStr
    BasketHdr.obj : error LNK2001: unresolved external symbol _E_Count
    Debug/BasketHdr.exe : fatal error LNK1120: 26 unresolved externals
    Error executing link.exe.

    BasketHdr.exe - 27 error(s), 0 warning(s)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 09:18 PM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 10:15 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 02:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM

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