Re: Error in VS2005

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Victor Bazarov" <v.Abazarov@xxxxxxxxxxxx> wrote in message
news:evJgC6LPGHA.2040@xxxxxxxxxxxxxxxxxxxxxxx
Drew wrote:
I'm moving some code from VS6 to VS2005 and am getting an error:

error C2059: syntax error : 'string'

on line:

extern "C"

How to resolve this?

Are you compiling as C or as C++? What's on the preceding line?
Take a habit of posting enough code for us to copy-paste-and-compile
so we can at least try reproducing the behaviour you describe.

V

Victor,

I was attempting to compile as C++ via compiler switch /TP, but when then
project was upgraded from VS6 to VS2005 it marked the project file with /TP
but all the .c files with /TC. Must be a bug.

Thanks,
Drew


.



Relevant Pages

  • Re: One of my first C functions - Please comment
    ... compiling as is. ... This is a syntax error (or rather, any attempt to use this macro is a ... c is of type char; ... I was expecting a derefence here. ...
    (comp.lang.c)
  • Re: errors -C2059 and C2143
    ... Given that you are getting an error on line 1, this means you have a syntax error in the ... you might consider compiling with the /P switch (you have to add it ... typedef map<short, ValueMap> KeywordValueMap; ... int LookupValue; ...
    (microsoft.public.vc.mfc)
  • Re: Function to compares two arrays and returns indices where they are equivalent
    ... Running the code is like compiling the ... But if you have syntax error, ... in any language, even Fortran. ... language, if all things being equal, but they are not, for me. ...
    (comp.lang.fortran)
  • Re: broken sources?
    ... Renli wrote: ... isn't compiling, I have narrowed it down to NOT makedefs.c. ... the error message: ... syntax error on line 3 ...
    (rec.games.roguelike.nethack)
  • Re: syntax errors while building pypgsql
    ... I'm trying to install pypgsql. ... while compiling the C sources. ... PyObject_HEAD /* Here is the syntax error, ... That would be an indication that you do not have the python-devel ...
    (comp.lang.python)