Author Topic: Problem building VisStudio project  (Read 6116 times)

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Problem building VisStudio project
« on: August 05, 2008, 06:46:28 PM »
WinXP sp3, SlickEdit 13.0.1, h/f 20
VisStudio 2005

When I open a VisStudio .sln file in SlickEdit, I get build errors like:
Quote
fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
It appears the Include directories are not being used.

On the Project->Properties->Directories tab I have a number of relative paths, as well as some absolute paths.  It appears that the absolute paths are not included on the command line.
For example, these directories are listed on the Directories tab:
..\3RDPARTY\FME\SRC
..\3RDPARTY\LOCK\SRC
C:\MicrosoftVisualStudio8\VC\include
C:\MicrosoftVisualStudio8\VC\atlmfc\include
%(INCLUDE)

The compile command, though, looks like this:
Quote
cl  /Od /W3 /WX /Zi "/DWIN32" "/D_DEBUG" "/D_WINDOWS"
<much snipped>
   -D_CRT_SECURE_NO_DEPRECATE
   -D_USE_32BIT_TIME_T
   -DDEVELOPMENT
   /I "..\3RDPARTY\FME\SRC" /I "..\3RDPARTY\LOCK\SRC" /c

What am I doing wrong?


hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Problem building VisStudio project
« Reply #1 on: August 05, 2008, 07:23:26 PM »
Maybe your default INCLUDE/LIB/etc. env. var setup is not correct.
'%VS80COMNTOOLS%\vsvars32.bat' could be used to setup VS2005 environment if it's not set.
HS2

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Problem building VisStudio project
« Reply #2 on: August 11, 2008, 03:24:16 PM »
Maybe your default INCLUDE/LIB/etc. env. var setup is not correct.
'%VS80COMNTOOLS%\vsvars32.bat' could be used to setup VS2005 environment if it's not set.
HS2
Is there a way to call that from inside SlickEdit, perhaps when the project opens?

If I call vsvars32.bat in a console window, and start SlickEdit from that command line, the Build command works as expected.
However, there are still strange problems with the Compile command, as though the wrong files were being included.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Problem building VisStudio project
« Reply #3 on: August 11, 2008, 03:55:52 PM »
When opening a Visual Studio solution file, SlickEdit does try to look for installed versions of Visual Studio to setup various environment variables for builds and compiles.  There are SlickEdit commands to do this manually, but they are supposed to happen automatically for you when you open the workspace.   Try set-visualstudio8-environment on the SlickEdit command-line, if it finds the correct devenv, the Build window should show all the environment variables set.  If it works manually, then there is something else going on that I'll need to track down.

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Problem building VisStudio project
« Reply #4 on: August 11, 2008, 05:01:01 PM »
Thanks for the reply.

Running 'set-visualstudio8-environment' on SlickEdit command line:
"InstallDir key not found under SOFTWARE\Microsoft\VisualStudio\8.0Exp"

??

Running 'set-visualstudio-environment':
"Visual C++ is already setup.  devenv.exe is already in your PATH."

From Visual Studio->Help->About
Microsoft Visual Studio 2005
Version 8.0.50727.762  (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727 SP1

Installed Edition: Professional

<snip all tools and addins...>

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Problem building VisStudio project
« Reply #5 on: August 11, 2008, 06:20:12 PM »
Any chance you could post the Visual Studio solution file so I could take a look at it or send it through support@slickedit.com.  SlickEdit attempts to get the correct Visual Studio version by parsing the sln file, an error appears to have occurred with yours.  Any info on how it was generated or where you got the solution file from?

Additionally, SlickEdit uses the registry settings to determine the installed location for versions of Visual Studio.  Would it possible for you export your registry settings for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Studio?  I'm wondering if there is an entry in there that's at issue when we try to enumerate them.
« Last Edit: August 11, 2008, 06:36:34 PM by Lee »

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Problem building VisStudio project
« Reply #6 on: August 11, 2008, 06:36:53 PM »
Any chance you could post the Visual Studio solution file so I could take a look at it or send it through support@slickedit.com.  SlickEdit attempts to get the correct Visual Studio version by parsing the sln file, an error appears to have occurred with yours.  Any info on how it was generated or where you got the solution file from?

Additionally, SlickEdit uses the registry settings to determine the installed location for versions of Visual Studio.  Would it possible for you export your registry settings for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Studio?  I'm wondering if there is an entry in there that's at issue when we try to enumerate them.

emailed...