469,927 Members | 1,464 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Pre-ANSI C functions and .NET browse information symbols

RK
I need to compile a library of C code with pre-ANSI C functions using MS
..NET 2003. The functions are declared something like this:

int myFunction(p)
double p;
{
int x;
code here...
return x;
}

The compilation proceeds without a glitch but when I tell .NET to build
browse information for the functions, it seems not to include the pre-ANSI
functions in browse information.

I could manually make the functions ANSI compliant by changing the code but
there are 75+ functions. This seems to work for a few functions that I have
altered. Is there a switch that tells .NET that the functions are pre-ANSI
style so that it can build the browse information correctly or some other
way to get the functions into the browse information?

Thanks,
RK
Nov 14 '05 #1
5 1576
In article <pe********************@comcast.com>, us**@email.com says...
I need to compile a library of C code with pre-ANSI C functions using MS
.NET 2003. The functions are declared something like this:

int myFunction(p)
double p;
{
int x;
code here...
return x;
}

The compilation proceeds without a glitch but when I tell .NET to build
browse information for the functions, it seems not to include the pre-ANSI
functions in browse information.

I could manually make the functions ANSI compliant by changing the code but
there are 75+ functions. This seems to work for a few functions that I have
altered.


There are a lot of benefits to moving them forward in time to the 1980s. Just
do it and be done with it. You might also find that some subtle problems get
uncovered (and fixed) in this process.

--
Randy Howard (2reply remove FOOBAR)
Nov 14 '05 #2
RK wrote:
I need to compile a library of C code with pre-ANSI C functions using MS
.NET 2003. The functions are declared something like this:

int myFunction(p)
double p;
{
int x;
code here...
return x;
}

The compilation proceeds without a glitch but when I tell .NET to build
browse information for the functions, it seems not to include the pre-ANSI
functions in browse information.

I could manually make the functions ANSI compliant by changing the code but
there are 75+ functions. This seems to work for a few functions that I have
altered. Is there a switch that tells .NET that the functions are pre-ANSI
style so that it can build the browse information correctly or some other
way to get the functions into the browse information?

Thanks,
RK


You can use this feature of GCC to generate the ANSI prototypes
for your functions and then simply copy-n-paste them replacing stuff.

gcc -c *.c -aux-info prog.h

Or, better:

http://sourceforge.net/projects/cproto/

Regards,
Jonathan.

--
"We must do something. This is something. Therefore, we must do this."
- Keith Thompson
Nov 14 '05 #3

"RK" <us**@email.com> schreef in bericht
news:pe********************@comcast.com...
I could manually make the functions ANSI compliant by changing the code but there are 75+ functions. This seems to work for a few functions that I have altered. Is there a switch that tells .NET that the functions are pre-ANSI
style so that it can build the browse information correctly or some other
way to get the functions into the browse information?


75 is not a lot. Pay me for half a day and I'll do it :)
Nov 14 '05 #4
Jonathan Burd wrote:
RK wrote:
I need to compile a library of C code with pre-ANSI C functions using
MS .NET 2003. The functions are declared something like this:

int myFunction(p)
double p;
{
int x;
code here...
return x;
}

The compilation proceeds without a glitch but when I tell .NET to
build browse information for the functions, it seems not to include
the pre-ANSI functions in browse information.

I could manually make the functions ANSI compliant by changing the
code but there are 75+ functions. This seems to work for a few
functions that I have altered. Is there a switch that tells .NET that
the functions are pre-ANSI style so that it can build the browse
information correctly or some other way to get the functions into the
browse information?

Thanks,
RK


You can use this feature of GCC to generate the ANSI prototypes
for your functions and then simply copy-n-paste them replacing stuff.

gcc -c *.c -aux-info prog.h

Or, better:

http://sourceforge.net/projects/cproto/

Regards,
Jonathan.


<ot>
[Your email address isn't available, so:]
Supplementary information:
To build cproto using OpenWatcom and UnxUtils:
1. Edit the watcom.mak makefile.
2. Replace "lex" with "flex" and "yacc" with "bison".
3. At the command prompt:
wmake /u /f watcom.mak
4. cproto --help

UnxUtils: unxutils.sourceforge.net
OpenWatcom: www.openwatcom.org
</ot>

Regards,
Jonathan.

--
"We must do something. This is something. Therefore, we must do this."
- Keith Thompson
Nov 14 '05 #5
RK
Thanks to those who replied. I will change the functions to make them ANSI
compliant. One more thing that I forgot to mention in my original post -
Visual Studio 6.0 does recognize pre-ANSI functions and correctly builds
browse information for them...

Regards,
RK
"RK" <us**@email.com> wrote in message
news:pe********************@comcast.com...
I need to compile a library of C code with pre-ANSI C functions using MS
.NET 2003. The functions are declared something like this:

int myFunction(p)
double p;
{
int x;
code here...
return x;
}

The compilation proceeds without a glitch but when I tell .NET to build
browse information for the functions, it seems not to include the pre-ANSI
functions in browse information.

I could manually make the functions ANSI compliant by changing the code
but there are 75+ functions. This seems to work for a few functions that I
have altered. Is there a switch that tells .NET that the functions are
pre-ANSI style so that it can build the browse information correctly or
some other way to get the functions into the browse information?

Thanks,
RK

Nov 14 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Headless | last post: by
Pre
3 posts views Thread by Neal | last post: by
7 posts views Thread by Alan Illeman | last post: by
2 posts views Thread by Buck Turgidson | last post: by
5 posts views Thread by Michael Shell | last post: by
8 posts views Thread by Jarno Suni not | last post: by
9 posts views Thread by Eric Lindsay | last post: by
14 posts views Thread by Schraalhans Keukenmeester | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.