Author Topic: Compile Question for beginner  (Read 4957 times)

DHw

  • Community Member
  • Posts: 6
  • Hero Points: 0
Compile Question for beginner
« on: May 01, 2007, 02:31:51 pm »
I just installed it, and creat one sample of 'HelloWorld' program, when I compile it with VC6, it will output this message as the below.

d:\Program Files\SlickEdit\win\MyProSlick>g++ -c    -g -o "Debug/HelloWorld.o"  "d:/Program Files/SlickEdit/win/MyProSlick/HelloWorld.cpp"&"D:\Program Files\SlickEdit\win\vsbuild" -signalport 9000 -signal "execute-post-build "
'g++' is not an internal or external command or executed application or batch file.

How do I do now??

Thanks so much
DHw.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2920
  • Hero Points: 438
Re: Compile Question for beginner
« Reply #1 on: May 01, 2007, 05:21:16 pm »
You should start with the correct project type if you want to use Visual Studio to do your compiles.

I would recommend you to use Visual Studio to create your projects and then open them in SlickEdit, however, if you want to use our build system, and you set up all your paths and environment correctly for Visual C++ (see vcvars32.bat in the VCPP installation directory), you could use the "Microsoft Visual C++ Toolkit Wizard" project type, which will manage the project and build dependencies using our build utility, and use "cl.exe" to compile.  This is, in fact, similar to how we do our builds in-house.

DHw

  • Community Member
  • Posts: 6
  • Hero Points: 0
Re: Compile Question for beginner
« Reply #2 on: May 02, 2007, 02:04:57 am »
Hello Dennis,
It can work if I crease one program by VC, then open it by Slickedit, just got one message when compiling in the below
"NMAKE : fatal error U1052: file 'testsclikbyvc.mak' not found
Stop."
, the name of testsclikbyvc is my test example.
I also find the compiler command in the project properctiy, it is nmake /F "%rn.mak" "%b" "%bd%n.obj", what's mean? is there some option wrong or other. But I can build and rebuild, also can execute it.

Another two questions:
1) If I create some program of C/C++ by SlickEdit, still has some problem now. Maybe some path or environment are not correct. I list vcvars32.bat file of my computer:
//
@echo off
rem
rem Root of Visual Developer Studio Common files.
set VSCommonDir=C:\PROGRA~1\MICROS~4\Common

rem
rem Root of Visual Developer Studio installed files.
rem
set MSDevDir=C:\PROGRA~1\MICROS~4\Common\msdev98

rem
rem Root of Visual C++ installed files.
rem
set MSVCDir=C:\PROGRA~1\MICROS~4\VC98

rem
rem VcOsDir is used to help create either a Windows 95 or Windows NT specific path.
rem
set VcOsDir=WIN95
if "%OS%" == "Windows_NT" set VcOsDir=WINNT

rem
echo Setting environment for using Microsoft Visual C++ tools.
rem

if "%OS%" == "Windows_NT" set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH%
if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"
set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%
set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%

set VcOsDir=
set VSCommonDir=
//


What's additional path or information I need to add in this file?

2) When I try to create project using "Microsoft Visual C++ Toolkit Wizard" by SlickEdit, it also can't compile or build program same as before. I guess problem is "path or environment.

Thanks so much,
DHw.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2920
  • Hero Points: 438
Re: Compile Question for beginner
« Reply #3 on: May 02, 2007, 03:05:15 pm »
You should not modify vcvars32.bat.  This batch file is distributed with VC++.  Run it to make sure that your current shell has everything you need to run cl.exe.  It will set up your path, include path, and library path.  If you set up a project using the toolkit wizard, then source vcvars32.bat, you should be able to build within SlickEdit.  You will still need VC++ to debug though.

With respect to the makefile issue, you would need to have that makefile (which VC++ can generate, you might have to research that more yourself) if you wanted to compile individual files.  But, since build and rebuild work and are super-fast for a small project, I wouldn't worry about compiling individual files, just use build, then you will always be sure that all the build dependencies are taken care of.


DHw

  • Community Member
  • Posts: 6
  • Hero Points: 0
Re: Compile Question for beginner
« Reply #4 on: May 03, 2007, 02:07:36 am »
Dear Dennis,
Thanks for your good reply, I have fixed them.

Also I will take some time to learn this new tool in my project.

Best Regards,
DHw.

DPCroghan

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: Compile Question for beginner
« Reply #5 on: June 05, 2007, 07:17:26 pm »
Hi,
I just installed the trial version of SlickEdit.  I can't figure something out with the Project->Project Properties->Tools Command line dialog. 

The substitutes (i.e. %<something>) are great, however I would like to specify the include path as

"-I <MS-DOS path>"

instead of:
 
"-I<MS-DOS path>"

(in both cases, without the double-quotes).  In other words, I would like to put a space between the path and the -I compiler directive.  I can compile the code just fine using a command prompt.  And if I type the include path in on the command line, it works in Slick Edit.

Where can I put a space, or set up SlickEdit to use (for example) "-I " vice "-I" when putting the include path on the command line using the "%i" shortcut?

Thanks
Dan

Other info: I'm using Lahey FORTRAN: it comes with Microsoft Visual Studio, which seems to be a real PITA when developing large projects.

donjoe

  • Community Member
  • Posts: 35
  • Hero Points: 1
Re: Compile Question for beginner
« Reply #6 on: July 06, 2007, 07:57:57 am »
I have a different problem. I've created a project with custom build commands for a special C-language clone and its special compiler. The addition of the text
Quote
&"D:\Program Files\SlickEdit\win\vsbuild" -signalport 9000 -signal "execute-post-build "
seems to prevent my build command from working. How do I get rid of it?



Later Edit:
Oops, never mind my question. It wasn't working because there were spaces in the path to my compiler and I hadn't enclosed it (together with the filename) in quote marks.
« Last Edit: July 06, 2007, 01:31:06 pm by donjoe »