.net compiler
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
.net compiler
how do i use the .net compiler from the free Microsoft Visual C++ Toolkit 2003 in textpad?
- TheSquirrelKing
- Posts: 3
- Joined: Mon Oct 04, 2004 8:24 pm
- Location: Canada, eh!
- TheSquirrelKing
- Posts: 3
- Joined: Mon Oct 04, 2004 8:24 pm
- Location: Canada, eh!
The rather obvious aside, I was asking (or maybe just trying to) if anyone already had the specific set of settings, flags, and all that good stuff already configured in a way that has worked well for them. It's all good though, I managed to crank out a configuration that seems to be working properly so far. In a pinch I can fall back on Visual Studio, but interestingly enough I prefer TextPad for a number of reasons. How's that for praise?
- TheSquirrelKing
- Posts: 3
- Joined: Mon Oct 04, 2004 8:24 pm
- Location: Canada, eh!
hmm, I no longer have the tool setup on my system (did a Windows re-install...) but I googled the issue and was able to find this page that may help you: http://guinness.cs.stevens-tech.edu/~as ... r_VCpp.htm
Thanks, I missed some paths.
Instead of changing the PATH variable, I use a batch file, so I can change it if needed, without restarting Textpad.
cl.bat:
Instead of changing the PATH variable, I use a batch file, so I can change it if needed, without restarting Textpad.
cl.bat:
Code: Select all
@echo off
set PATH=%PATH%;D:\Program\Microsoft Visual Studio .NET 2003\Common7\IDE
set LIB=D:\Program\Microsoft Visual Studio .NET 2003\Vc7\lib;D:\Program\Microsoft.NET\SDK\v1.1\Lib
@echo on
"D:\Program\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
Its a darn good tut on how to configure TP, but I simply cant get it to work the way it should, I keep getting the errors below and all the paths etc are correct - although the same program compiles and runs ok from the command prompt..
Closing TP and reopening with the .cpp file loaded will sometimes compile without errors but no .exe file is created...
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
cl : Command line warning D4024 : unrecognized source file type 'Files\Microsoft', object file assumed
cl : Command line warning D4027 : source file 'Files\Microsoft' ignored
cl : Command line warning D4024 : unrecognized source file type 'Visual', object file assumed
cl : Command line warning D4027 : source file 'Visual' ignored
cl : Command line warning D4024 : unrecognized source file type 'Studio', object file assumed
cl : Command line warning D4027 : source file 'Studio' ignored
cl : Command line warning D4024 : unrecognized source file type '.NET', object file assumed
cl : Command line warning D4027 : source file '.NET' ignored
cl : Command line warning D4024 : unrecognized source file type '2003\Vc7\include"', object file assumed
cl : Command line warning D4027 : source file '2003\Vc7\include"' ignored
textPadCompile1.cpp
G:\textPadCompile1.cpp(4) : error C2873: 'System' : symbol cannot be used in a using-declaration
G:\textPadCompile1.cpp(6) : error C3381: 'DebugTwo1' : an assembly access specifier can only be applied to a managed type
G:\textPadCompile1.cpp(8) : error C2144: syntax error : 'void' should be preceded by ':'
G:\textPadCompile1.cpp(23) : fatal error C1004: unexpected end of file found
Tool completed with exit code 2
Closing TP and reopening with the .cpp file loaded will sometimes compile without errors but no .exe file is created...
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
cl : Command line warning D4024 : unrecognized source file type 'Files\Microsoft', object file assumed
cl : Command line warning D4027 : source file 'Files\Microsoft' ignored
cl : Command line warning D4024 : unrecognized source file type 'Visual', object file assumed
cl : Command line warning D4027 : source file 'Visual' ignored
cl : Command line warning D4024 : unrecognized source file type 'Studio', object file assumed
cl : Command line warning D4027 : source file 'Studio' ignored
cl : Command line warning D4024 : unrecognized source file type '.NET', object file assumed
cl : Command line warning D4027 : source file '.NET' ignored
cl : Command line warning D4024 : unrecognized source file type '2003\Vc7\include"', object file assumed
cl : Command line warning D4027 : source file '2003\Vc7\include"' ignored
textPadCompile1.cpp
G:\textPadCompile1.cpp(4) : error C2873: 'System' : symbol cannot be used in a using-declaration
G:\textPadCompile1.cpp(6) : error C3381: 'DebugTwo1' : an assembly access specifier can only be applied to a managed type
G:\textPadCompile1.cpp(8) : error C2144: syntax error : 'void' should be preceded by ':'
G:\textPadCompile1.cpp(23) : fatal error C1004: unexpected end of file found
Tool completed with exit code 2
It looks like you need to put quotes around the include path, since it contains spaces, i.e.
or use the old dos 8.3 notation:
(you can check the numbers from a command prompt with dir /x)
Code: Select all
"c:\Program Files\Microsoft Visual Studio .Net 2003\Vc7\include"
Code: Select all
c:\progra~1\micros~1.net\vc7\include
Ya .. paths are quoted in the parameters field:
-I�C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include� -EHsc -c $File
-LIBPATH:�C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib� -LIBPATH:�C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib� $BaseName.obj
Dunno what else could be the issue and google dont seem to have answers on this one.
/Pete.
-I�C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include� -EHsc -c $File
-LIBPATH:�C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib� -LIBPATH:�C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib� $BaseName.obj
Dunno what else could be the issue and google dont seem to have answers on this one.
/Pete.
Good one!
That quote must have come from when I copied the path from the tut as it was exactly the same path as mine... now it executes without error but still not compiling .. strange, it compiles from cmd.
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
TextpadCompile1.cpp
G:\TextpadCompile1.cpp(12) : error C2873: 'System' : symbol cannot be used in a using-declaration
G:\TextpadCompile1.cpp(14) : error C3381: 'CompareNames' : an assembly access specifier can only be applied to a managed type
G:\TextpadCompile1.cpp(15) : error C2144: syntax error : 'void' should be preceded by ':'
G:\TextpadCompile1.cpp(26) : fatal error C1004: unexpected end of file found
Tool completed with exit code 2
That quote must have come from when I copied the path from the tut as it was exactly the same path as mine... now it executes without error but still not compiling .. strange, it compiles from cmd.
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
TextpadCompile1.cpp
G:\TextpadCompile1.cpp(12) : error C2873: 'System' : symbol cannot be used in a using-declaration
G:\TextpadCompile1.cpp(14) : error C3381: 'CompareNames' : an assembly access specifier can only be applied to a managed type
G:\TextpadCompile1.cpp(15) : error C2144: syntax error : 'void' should be preceded by ':'
G:\TextpadCompile1.cpp(26) : fatal error C1004: unexpected end of file found
Tool completed with exit code 2
hmmm... heres my hello world
And heres my results:public class FirstClass
{
public static void Main()
{
System.Console.WriteLine("Hello World");
}
}
Wierd/ Pete.Microsoft (R) C/C++ Standard Compiler Version 13.10.3077 for .NET Framework
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
hello.cpp
C:\Documents and Settings\Webmasta\My Documents\hello.cpp(2) : error C3381: 'FirstClass' : an assembly access specifier can only be applied to a managed type
C:\Documents and Settings\Webmasta\My Documents\hello.cpp(3) : error C2144: syntax error : 'void' should be preceded by ':'
C:\Documents and Settings\Webmasta\My Documents\hello.cpp(8) : fatal error C1004: unexpected end of file found
Tool completed with exit code 2
Shouldn't there be a void main() in there somewhere (again, I'm just starting myself)?
Here's what I copied from an example:
Here's what I copied from an example:
Code: Select all
#using <mscorlib.dll>
using namespace System;
void main() {
Console::WriteLine(S"Hello World");
}