Re: Another question on VS2003 to VS2005



is GSPASCAL something you invented? If so, GET RID OF IT!!!! The concept of "PASCAL" is a
horrendously obsolete holdover from Win16 and should NOT be encouraged, and certainly
NEVER used in anything new. I've been after Microsoft for well over 10 years to remove
EVERY instance of the word "PASCAL" from the Platform SDK, MFC, and other header files. It
has no justification for its existence.

The question was not "what are the definitions" but "what lines precede this code". So
you haven't answered the question.

One thing you can do is add the /P switch to the compile line for this file (that's
upper-case P; /p means something else), and compile just that file. You will get a .i
file. Look at it, and make sure that what is in THAT file makes sense, because this is
what the compiler is actually seeing. The observations already made about missing
semicolons in header files really matter.
joe

On Wed, 26 Sep 2007 09:25:40 -0700, DBC User <dbcuser@xxxxxxxxx> wrote:

On Sep 26, 11:09 am, Norbert Unterberg <nunterb...@xxxxxxxxxxxxxxxxx>
wrote:
DBC User schrieb:





I am converting my VS2003 to VS2005 and with the help of this group I
got most of all the errors resolved except the following two messages
both at the following line of the code

extern "C" LONG GSFAR GSPASCAL GSEXPORT RegApp(short nfYear, short
ncYear, LPCSTR path, LPCSTR lpath, BOOL ball, HWND hWnd)
{

the errors are

1. syntax error : 'int' should be preceded by ';'
2. missing type specifier - int assumed. Note: C++ does not support
default-int

BOOL is typedef int and others are stright forward. I can not figure
out why is it failing.

Check if LONG, GSFAR, GSPASCAL and GSEXPORT are correctly defined as something
meaningful.

In addition, errors like this can happen if the code line before this (the code
you do not show) misses a ";". It can even be a missing semicolon at the end of
a class definition in a header file that is included before these lines.

Norbert- Hide quoted text -

- Show quoted text -

Thank you both and here is what I have in for definitions

#define GSFAR
#define GSPASCAL
#define GSEXPORT __declspec(dllexport)
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Header files
    ... In the fortran code that I have, there is a subroutine in which ... I am using a pgi compiler to compile 2D.F and my code. ... character...and it gives the names of all header files. ...
    (comp.lang.fortran)
  • Re: Problem with reading an int with operator>>
    ... Stephen Howe wrote: ... Now I know there were a few flaws in the header files for Visual Studio ... So that if I did want to use dynamic linking, the VC6 standard library would be defective. ... But as Tom pointed out, there are only two common instantiations of much of the standard library, i.e. those for char and wchar_t, and MS has chosen to compile those into the C++ RTL DLL. ...
    (microsoft.public.vc.stl)
  • Re: changing module files
    ... > actually defined somewhere is not determined until compile time. ... methods, they must be defined in the declaration used by callers, ... > understand and be comfortable with all of the preprocessor macros. ... No macros are needed by C or C++ header files particularly except ...
    (comp.lang.fortran)
  • Re: Problem with reading an int with operator>>
    ... is not so) is that if you compile stand alone, ... Now I know there were a few flaws in the header files for Visual Studio ... If you compiled with /ML or /MT in force, the constructor I think, lives ... If I examine the imports from MSVCP71.DLL that TEST.EXE has made, ...
    (microsoft.public.vc.stl)
  • Re: g++ compile warning: extra tokens at end of #include directive
    ... > instead of having the class definition in the main file. ... > getting this warning at compile time: ... The definitions are in "myclass.cpp" and get added to your compile ...
    (comp.lang.cpp)

Loading