structs

From: Harry Overs (hovers_at_dera.gov.uk)
Date: 08/23/04


Date: Mon, 23 Aug 2004 09:43:58 +0100

I've just been given some code which is written in a C way (i.e. no classes)
and which acts as an interface for a program written in Ada.
Our aim is to modify the C/C++ code so that the interface sends an receives
data over a socket connection. I implmented all of the socket side with no
problem and have created a struct which will be passed in and out of the
program. The problem that I have is that when I build this interface by
itself in Visual Studio 6 it compiles fine with no errors, however when I
try and compile it on the command line (still using the studio compiler, I
am compiling this on the command line as I have to use gnat to compile the
Ada code and then to link all of these object files together to create my
executable), I get errors where the struct is used, i.e.

struct myStruct
{
  int a ;
  int b ;
}

void myProc ( myStruct *stru ) ; -- error on this line

does anyone have any idea why this wont work on the command line but will in
the studio environment?

(also there may be one or two errors in the above code as the code is on a
different machine, also I have though about just compiling it in studio and
then copying the object files, but this seems to me to be a bodge instead of
a proper fix)

cheers,



Relevant Pages

  • Re: structs
    ... > itself in Visual Studio 6 it compiles fine with no errors, ... > try and compile it on the command line (still using the studio compiler, ... > executable), I get errors where the struct is used, i.e. ...
    (comp.lang.cpp)
  • RE: First Visual Studio C++.net Project
    ... Here's the out of my compile: ... Command Lines Creating temporary file "c:\Documents and ... Settings\louis.AZALEA\My Documents\Visual Studio ... Creating temporary file "c:\Documents and Settings\louis.AZALEA\My ...
    (microsoft.public.dotnet.languages.vc)
  • compling vb.net web appliction
    ... I am trying to create the Knowledge Base Articl 326340 project. ... last steps is to "Save all files, and then compile the project". ... Do I do it from within VB Studio some where. ... need to compile from the command line? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: creaping coupling......
    ... but it is a more strict contract than required. ... "I am capable of implementing things via interface XYZ i.e. ... consider specifically that we compile, deploy and then we delete a method to ... IWriteable pipe = new Pipe; ...
    (comp.object)
  • Re: Problem in calling c programs and compiling them in tcl/tk
    ... Are you using Tcl's glob command to do this? ... using exec gcc filename.c and later exec ./a.out filename.c. ... the execution of a command that might generate a Tcl error. ... i can call a c program and compile it? ...
    (comp.lang.tcl)