ArrayList


Z

Z.K.

Why does the following code not work? I get the error

Compiling...

cl : Command line error D8016 : '/MT' and '/clr:blush:ldsyntax' command-line
options are incompatible

Build log was saved at "file://c:\Documents and Settings\Pod\My
Documents\Visual Studio
2005\Projects\C++\AsciiTest\AsciiTest\Debug\BuildLog.htm"

AsciiTest - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



// This is the main project file for VC++ application project

// generated using an Application Wizard.

#include "stdafx.h"

#using <mscorlib.dll>

using namespace System;

using namespace System::Collections;

int main()

{

// TODO: Please replace the sample code below with your own.


ArrayList^ arList = new ArrayList();

Console::WriteLine(S"Hello World");

return 0;

}
 
Ad

Advertisements

D

David Wilkinson

Z.K. said:
Why does the following code not work? I get the error

Compiling...

cl : Command line error D8016 : '/MT' and '/clr:blush:ldsyntax' command-line
options are incompatible

Z.K.

You get this error because, wait for it, '/MT' and '/clr:blush:ldsyntax'
command-line options are incompatible.

You nust use dynamic linking with CLR (/MD in releaase mode, /MDd in
debug mode).

Project Properties -> C/C++ -> Code Generation

David Wilkinson
 
Z

Z.K.

Ok, so how do I add that. I am using VC++ Express 2005 and I tried adding
it to the linker command line option, but that did not seem to work.

Z.K.
 
Ad

Advertisements

T

Tamas Demjen

Z.K. said:
Ok, so how do I add that. I am using VC++ Express 2005 and I tried adding
it to the linker command line option, but that did not seem to work.

Properties -> C/C++ -> Code Generation -> Runtime Library =
Multi-threaded DLL

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top