C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 15th, 2005, 10:34 PM
annag2nu annag2nu is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 3 annag2nu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 41 sec
Reputation Power: 0
Cool C/C++ Compilation errors

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 '*'

Reply With Quote
  #2  
Old March 16th, 2005, 09:00 AM
Cirus Cirus is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 276 Cirus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 11 h 48 m 58 sec
Reputation Power: 4
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.

Reply With Quote
  #3  
Old March 16th, 2005, 05:46 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
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.

Reply With Quote
  #4  
Old March 22nd, 2005, 04:36 AM
annag2nu annag2nu is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 3 annag2nu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 41 sec
Reputation Power: 0
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:
Originally Posted by Cirus
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.

Reply With Quote
  #5  
Old March 22nd, 2005, 01:45 PM
Cirus Cirus is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 276 Cirus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 11 h 48 m 58 sec
Reputation Power: 4
Quote:
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 ....


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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > C/C++ Compilation errors


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT