22 December 2015, 18:02 | #1 | ||
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,443
|
Linking errors with vbcc when not using C99
Hi all!
While I was playing with my XAD client, I stumbled on this linking error that I cannot explain: when compiling/linking with C99 option, my code compiles and links fine, but without this option, I receive linking errors... Could someone please explain me what I am missing? Here is the log with the C99 option: Quote:
Quote:
Thanks in advance to enlighten me and... merry X-mas |
||
22 December 2015, 23:17 | #2 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
@tygre
What do the source lines (and any function declaration lines) look like that give the errors? Vbcc is very strict about ANSI mode (default) so any new C commands will generate an error. GCC by default uses a hybrid GCCism C mode with some new commands. GCC requires a command line switch to turn on strict ANSI or c99 compliance but many programmers are used to the friendly GCCism C mode. The best option I know of for vbcc to be less strict is to use the -c99 switch as you have learned . |
22 December 2015, 23:38 | #3 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 725
|
I am not familiar with vbcc but....can you make vc verbose and show the exact vlink call that succeeds (in the first snippet)?
We have the failed call in the second snippet, if we could compare it with the first succesful one...it would be a start. |
22 December 2015, 23:54 | #4 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
http://server.owl.de/~frank/vbcc/docs/vbcc.pdf |
|
23 December 2015, 00:44 | #5 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
The headers require C99 for some of the functions due to variadic arguments. You can supply a tag list instead and use the alternative xadGetInfoA, xadFileUnArcA etc.
|
25 December 2015, 21:01 | #6 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,443
|
Hi all!
Leffmann, thank you so much, you were spot on! I replaced the original calls with the "A" version and sets of tag items and everything compiles, links, and runs flawlessly Thanks and merry X-mas! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Linking problem | arti | Coders. C/C++ | 2 | 23 January 2015 19:03 |
vbcc C99 math for the 68k FPU | matthey | Coders. C/C++ | 0 | 12 August 2014 18:53 |
VBCC assembler linking syntax? | NovaCoder | Coders. General | 2 | 20 May 2011 03:04 |
|
|