Hello,
1. When trying to compile for release I have got the error:
Command line error D8016 : '/MT' and '/clr
ldsyntax' command-line
options
are incompatible
So I switched it to: Multi-threaded DLL (/MD) for the C\C++ -> Code
Generation -> Runtime Library.
Is that ok?
from MSDN:
a.. The following compiler options are not supported with /clr:
a.. /EHsc and /EHs (/clr implies /EHa (see /EH (Exception Handling
Model))
b.. /fp:strict and /fp:except (see /fp (Specify Floating-Point
Behavior).)/Zd
c.. /Gm
d.. /MT
e.. /RTC
f.. /ZI
/MD is not in the list, so that is fine.
2. After compile I am receiving the error:
Error 546 error AL1019: Metadata failure while creating assembly -- The
process cannot access the file because it is being used by another
process.
ALINK
But the Assembly is working ok, so do I need to worry about this error?
you don't have a resource file open for editing, or something like that?
try to close VS2005 completely, then reopen your project, make sure all
resource editing windows are closed, and then do a complete rebuild.
if that doesn't solve it, try to find out which files al is trying to
access. that might also give you some clues as to what is going on.
kind regards,
Bruno.
Regards,
Asaf
:
The /clr flag is only valid for C++, so you should turn of this flag
to
compile .c files. I don't get it that this project compiled with
VS2003
as
this requirement didn't change.
Willy.
| Hello Bruno,
|
| After setting the file to compile with C++ the compilation for that
file
| results in about 34 errors.
|
| Any thing else that can solve this problem please?
|
| Regards,
| Asaf
|
|
| "Bruno van Dooren" wrote:
|
| > if you right-click the file in your solution window, then under
| > configuration properties -> C/C++ ->Advanced
| > you can set the option 'Compile as' to C++.
| >
| > that will cause VC2005 to compile it as a C++ file instead of a C
file.
| >
| > kind regards,
| > Bruno.
| >
| >
| > | > > Hello Bruno,
| > >
| > > Now when trying to compile the solution I am receiving the
error:
| > >
| > > Error 121 Command line error D8045 : cannot compile C file
| > > '.\kernel\Zip\win32\win32zip.c' with the /clr option cl
| > >
| > > Is there other switch I can set on the file so it will compile
with
VS.NET
| > > 2005?
| > >
| > > Regards,
| > > Asaf
| > >
| > >
| > > "Bruno van Dooren" wrote:
| > >
| > >> In your case it is perfectly safe to use a cast to get rid of
the
const
| > >> qualifier.
| > >> char* psz = (char *) max(strrchr((LPCTSTR)szName, '\\'),
| > >> strrchr((LPCTSTR)szName, '/'));
| > >>
| > >> the max macro returns a const char *, because that is what
strrchr
| > >> returns
| > >> in this case.
| > >> since you already know that the buffer is not const (it is your
own
| > >> buffer)
| > >> it is safe to cast the const away.
| > >>
| > >> kind regards,
| > >> Bruno.
| > >>
| > >>
| > >>
| > >>
| > >>
| > >> | > >> > Hello Bruno,
| > >> >
| > >> > Thanks for your reply.
| > >> >
| > >> > For all the lines that contains "for" loop I have added the
"int"
like:
| > >> >
| > >> > for ( i = 0; i < EOC.TotalEntries; i++ )
| > >> >
| > >> > for (int i = 0; i < EOC.TotalEntries; i++ )
| > >> >
| > >> > So only four errors remains.
| > >> >
| > >> > For the line:
| > >> >
| > >> > char* psz = max(strrchr((LPCTSTR)szName, '\\'),
| > >> > strrchr((LPCTSTR)szName,
| > >> > '/'));
| > >> >
| > >> > I am reciving the error:
| > >> >
| > >> > Error 16 error C2440: 'initializing' : cannot convert from
'const
char
| > >> > *'
| > >> > to
| > >> > 'char *' c:\zip for .net\kernel\TFile.h 365
| > >> >
| > >> > Same for more identical three lines.
| > >> >
| > >> >
| > >> > And for the line:
| > >> > psz = max(strrchr((LPCSTR)szName, '\\'),
strrchr((LPCSTR)szName,
'/'));
| > >> >
| > >> > I am receiving the error:
| > >> > Error 26 error C2440: '=' : cannot convert from 'const char
*'
to
'char
| > >> > *' c:\Zip for .NET\kernel\TStringUtils.cpp 195
| > >> >
| > >> > The line is part of:
| > >> >
| > >> > char* psz;
| > >> > char szName[_MAX_DIR];
| > >> > strcpy(szName, (LPCSTR)strFileName);
| > >> > psz = max(strrchr((LPCSTR)szName, '\\'),
strrchr((LPCSTR)szName,
'/'));
| > >> > if(psz == NULL)
| > >> > {
| > >> > return PString("");
| > >> > }
| > >> > else
| > >> > {
| > >> > *psz = 0;
| > >> > return PString(szName);
| > >> > }
| > >> >
| > >> > I am a C# developer not a C++ so will be much appreciated if
you
can
| > >> > help
| > >> > me
| > >> > solve this problem.
| > >> >
| > >> > Regards,
| > >> > Asaf
| > >> >
| > >> >
| > >> > "Bruno van Dooren" wrote:
| > >> >
| > >> >> VC2005 will only convert the solution and project files.
| > >> >> if the code contains something that was valid in VC2003 but
not
| > >> >> VC2005,
| > >> >> (or
| > >> >> default build settings that were changed), you will have to
resolve
| > >> >> that
| > >> >> yourself.
| > >> >>
| > >> >> for example, in a small test project that i made, i used
'array'
as a
| > >> >> variable name. in VC2003 this compiles fine, in VC2005 this
is
a
| > >> >> reserved
| > >> >> keyword, leading to lots of compilation errors.
| > >> >>
| > >> >> it seems there are some implicit casts from const char * to
char *
in
| > >> >> your
| > >> >> code. check them out and do an explicit cast if you
determine
it
is
| > >> >> safe.
| > >> >>
| > >> >> for the 'i' undeclared identifier you'd have to show us some
code.
| > >> >>
| > >> >> kind regards,
| > >> >> Bruno.
| > >> >>
| > >> >>
| > >> >> | > >> >> > Hi,
| > >> >> >
| > >> >> > I have received a source code project written in C++
VS.NET
2003
on
| > >> >> > .NET
| > >> >> > 1.1
| > >> >> > that compiles without a problem.
| > >> >> >