| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I am getting the following compilation errors while trying to compile C code. I tried to simulate the XML library from the net and compile it using VC but am getting the following: C:\sybase\OCS-12_0\sample\esqlc\epg_engine\epg_engine\xml\libxml 2-2.6.17.win32\bin>rem path=e:\sybase12\OCS-12_0\dll;e:\sybase12\OCS-12_0\bin;"C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT";"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin";"C:\Program Files\Microsoft VisualStudio\Common\Tools";"C:\Program Files\Microsoft Visual Studio\VC98\bin"; C:\sybase\OCS-12_0\sample\esqlc\epg_engine\epg_engine\xml\libxml 2-2.6.17.win32\bin>path=c:\sybase\OCS-12_0\dll;c:\sybase\OCS-12_0\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft VisualStudio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin; C:\sybase\OCS-12_0\sample\esqlc\epg_engine\epg_engine\xml\libxml 2-2.6.17.win32\bin>C:\sybase\OCS-12_0\bin\cpre.exe -CMSVC -O xmlread1.c xmlread1.cp M_WHEN_ERROR,Unable to find the SQL statement 'WHENEVER SQLERROR'. M_WHEN_WARN,Unable to find the SQL statement 'WHENEVER WARNING'. M_WHEN_NF,Unable to find the SQL statement 'WHENEVER NOT FOUND'. 0 Error(s) and 3 Warning(s) found. Statistical Report: Program name: cpre Options specified: Input file name: xmlread1.cp Listing file name: Target file name: xmlread1.c ISQL file name: Tag ID specified: Compiler used: MSVC Open Client version: CS_VERSION_110 Number of information messages: 11 Number of warning messages: 3 Number of error messages: 0 Number of SQL statements parsed: 0 Number of host variables declared: 0 Number of SQL cursors declared: 0 Number of dynamic SQL statements: 0 Number of stored Procedures generated: 0 Connection(s) information: User id: Server: Database: C:\sybase\OCS-12_0\sample\esqlc\epg_engine\epg_engine\xml\libxml 2-2.6.17.win32\bin>cl /DDEBUG=1 /D_DEBUG=1 /DNET_DEBUG=1 /Od /Z7 /W3 -Ic:\sybase\OCS-12_0\include -I"C:\Program Files\Microsoft Visual Studio\VC98\Include" /Gz /MD /nologo /Foxmlread1.obj /c /DWIN32 xmlread1.c xmlread1.c C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(198) : error C2143: syntax error : missing '{' before '*' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(199) : error C2061: syntax error : identifier 'UNALIGNED' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(199) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(207) : error C2061: syntax error : identifier 'DWORD' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(208) : error C2061: syntax error : identifier 'MaxValue' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(208) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(209) : error C2059: syntax error : '}' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(211) : error C2143: syntax error : missing '{' before '*' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(219) : error C2061: syntax error : identifier 'BYTE' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(220) : error C2061: syntax error : identifier 'Label' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(220) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(221) : error C2059: syntax error : '}' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(223) : error C2143: syntax error : missing '{' before '*' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(231) : error C2061: syntax error : identifier 'WORD' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(232) : error C2061: syntax error : identifier 'Label' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(232) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(233) : error C2059: syntax error : '}' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(235) : error C2143: syntax error : missing '{' before '*' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(243) : error C2061: syntax error : identifier 'DWORD' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(244) : error C2061: syntax error : identifier 'Label' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(244) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(245) : error C2059: syntax error : '}' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(247) : error C2143: syntax error : missing '{' before '*' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(255) : error C2061: syntax error : identifier 'LARGE_INTEGER' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(256) : error C2061: syntax error : identifier 'Label' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(256) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(257) : error C2059: syntax error : '}' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(259) : error C2143: syntax error : missing '{' before '*' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(267) : error C2061: syntax error : identifier 'SYSTEMTIME' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(268) : error C2061: syntax error : identifier 'Label' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(268) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(269) : error C2059: syntax error : '}' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(271) : error C2143: syntax error : missing '{' before '*' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(279) : error C2061: syntax error : identifier 'BYTE' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(280) : error C2061: syntax error : identifier 'LabelOff' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(280) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(281) : error C2061: syntax error : identifier 'LabelOn' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(281) : error C2059: syntax error : ';' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(282) : error C2059: syntax error : '}' C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(284) : error C2143: syntax error : missing '{' before '*' |
|
#2
|
|||
|
|||
|
Must be the case of missing header file. Did you include all neccessary header files?
For SQL queries,did you prepare a connection properly? Another cause can be due to a semantic mistake.In other words, a missing paranthesis can cause a grave concern.The latter errors point to the fact to missing paranthesis or a stray sybmol violating structre of your program. Solution: I don't know much about SQL and its header files, but suggest you to debug it module wise and see the cause.This is in case your code is too long. Comment your code till the error is removed,then uncomment until error is removed. Hope my approach would help you. |
|
#3
|
|||
|
|||
|
That's it....just those?
Jaja...just Kidding! The first problem is, I think, like Cirus said, a matter of SQL headers. The command WHENEVER ....is not found and therefore not recongnized by the parser. The second error is a simple { missing. That starts a chain reaction that crushes the entire code. Check the first occurence of missing { before here: C:\Program Files\Microsoft Visual Studio\VC98\Include\bhtypes.h(198) : error C2143: syntax error : missing '{' before '*' Fix that and you should only have the problem with the SQL statements....which is not little and personaly...have no idea how to solve! Good Luck Anibal. |
|
#4
|
|||
|
|||
|
Thankx for your reply
Hi ,
Thankx for your reply!!! I solved my problem. The XML parser was using a parser.h file proprietry to the XML parser toolkit. VC also using PARSER.h as a system header file and so the conflict .... I renamed the VC header file and it compiled but am now getting linking error as follows: C:\sybase\OCS-12_0\sample\esqlc\epg_engine\epg_engine\xml\libxml 2-2.6.17.win32\bin>path=c:\sybase\OCS-12_0\dll;c:\sybase\OCS-12_0\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft VisualStudio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin; C:\sybase\OCS-12_0\sample\esqlc\epg_engine\epg_engine\xml\libxml 2-2.6.17.win32\bin>cl /DDEBUG=1 /D_DEBUG=1 /DNET_DEBUG=1 /Od /Z7 /W3 -Ic:\sybase\OCS-12_0\include -I"C:\Program Files\Microsoft Visual Studio\VC98\Include" /Gz /MD /nologo /Foxmlread1.obj /c /DWIN32 xmlread1.c xmlread1.c xmlread1.c(36) : warning C4007: 'main' : must be '__cdecl' C:\sybase\OCS-12_0\sample\esqlc\epg_engine\epg_engine\xml\libxml 2-2.6.17.win32\bin>link /out:xmlread1.exe sybesql.obj xmlread1.obj c:\sybase\OCS-12_0\lib\libsybdb.lib c:\sybase\OCS-12_0\lib\libcs.lib c:\sybase\OCS-12_0\lib\libct.lib /MAP /DEBUG /DEBUGTYPc:cv "c:\Program Files\Microsoft Visual Studio\VC98\Lib\kernel32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\Lib\advapi32.lib" "c:\Program Files\Microsoft Visual Studio\VC98\Lib\MSVCRT.lib" Microsoft (R) Incremental Linker Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. LINK : warning LNK4044: unrecognized option "DEBUGTYPc:cv"; ignored LINK : fatal error LNK1104: cannot open file "OLDNAMES.lib" .........if you can help me!!!! Quote:
|
|
#5
|
|||
|
|||
|
Quote:
Please exaplin. I am not clear. Its the case of linking error and deals with improper project settings.Ensure to include all mssing/relevant library files. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > C/C++ Compilation errors |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|