C++ Question VC++ problem

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
The directories?

I'm waiting for someone to post their's here so I can fix it.
I'm using VC++ 2005 Pro. I haven't used anything else (eg 2008) so I can't comment on the differences. The vcproj files VC++ 2005 uses are in xml so you can just open them in Notepad and cut and paste (2008 uses a different file structure, from what I've heard). Here are my settings from a recent project (I've snipped out a bunch of info irrelevant to this discussion):

Code:
<Configuration
    Name="Debug|Win32"
    OutputDirectory="......Modules"
    IntermediateDirectory="$(ConfigurationName)"
    ConfigurationType="2"
    ...
    <Tool
        Name="VCCLCompilerTool"
        Optimization="0"
        AdditionalIncludeDirectories=""C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2Include";....include;."
        BasicRuntimeChecks="3"
        RuntimeLibrary="1"
        WarningLevel="3"
        DebugInformationFormat="3"            />
    />
    ...
    <Tool
        Name="VCLinkerTool"
        AdditionalDependencies="kernel32.lib user32.lib gdi32.lib orbiter.lib orbitersdk.lib"
        OutputFile="$(OutDir)$(ProjectName).dll"
        AdditionalLibraryDirectories="....lib;"C:Program FilesMicrosoft Platform SDK for Windows Server 2003 R2Lib""
        IgnoreDefaultLibraryNames="msvcirt.lib;msvcrt.lib;libcmt.lib"
    />
    ...
</Configuration>
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Where can I find this file?
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
Where can I find this file?
The .vcproj file is typically in the same directory as your code for the project. If you are using VC++ 2008, I think the file structure is different. That's not particularly important though, I thought you wanted to see what settings were being used by others for directories, dependencies and ignores. Well, there they are.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
The .vcproj file is typically in the same directory as your code for the project. If you are using VC++ 2008, I think the file structure is different. That's not particularly important though, I thought you wanted to see what settings were being used by others for directories, dependencies and ignores. Well, there they are.

That didn't help...
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
You are already using those same settings?

Those were not the setting I was asking for.
I was asking for the settings in Tools- Options- Projects and Solutions-VC++ Directories.

I'd appreciate if someone posted these fields here.
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
These are the defaults from VS2008 installed on a 32-bit WinXP machine.

Tools- Options- Projects and Solutions-VC++ Directories. Include files:
Code:
$(VCInstallDir)include
$(VCInstallDir)atlmfcinclude
$(WindowsSdkDir)include
$(FrameworkSDKDir)include
Tools- Options- Projects and Solutions-VC++ Directories. Library files:
Code:
$(VCInstallDir)lib
$(VCInstallDir)atlmfclib
$(VCInstallDir)atlmfclibi386
$(WindowsSdkDir)lib
$(FrameworkSDKDir)lib
$(VSInstallDir)
$(VSInstallDir)lib
Additionally, I have the following settings in the project in order to grab the Orbiter stuff. Note that the given directory points to where ever you have the orbiter SDK installed, and will likely be different on your machine:

Project..Properties...Configuration Properties...C/C++...General...Additional Include Directories
Code:
C:Program FilesOrbiter-BuildOrbitersdkinclude
Project..Properties...Configuration Properties...Linker...General...Additional Library Directories
Code:
C:Program FilesOrbiter-BuildOrbitersdklib
These two settings can safely be moved to the global "Tools" setting earlier rather than being set on a per-project basis, if you prefer.

HTH
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Will they work with VC++ 2005?
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
Will they work with VC++ 2005?

Did you try them?


-----Post Added-----


From VC++ 2005 Express Edition:

Include:
Code:
$(VCInstallDir)include
$(VCInstallDir)PlatformSDKinclude
$(FrameworkSDKDir)include

Library:
Code:
$(VCInstallDir)lib
$(VCInstallDir)PlatformSDKlib
$(FrameworkSDKDir)lib
$(VSInstallDir)
$(VSInstallDir)lib
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Now I get this error message:
Code:
LINK : fatal error LNK1181: cannot open input file 'odbc32.lib'

EDIT:
Now I'm told it cannot find windows.h :huh:

EDIT EDIT:
Fixed directories, stopped asking for windows.h now.
However, it is still asking for odbc32.lib

And I get this:
Code:
c:orbiterorbitersdksamplesshuttlepbshuttlepb.cpp(45) : warning C4715: 'LiftCoeff' : not all control paths return a value

I though I fixed this...
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
EDIT EDIT:
Fixed directories, stopped asking for windows.h now.
However, it is still asking for odbc32.lib
Are you using the directories Heilor posted? In particular, this one:
Code:
$(VCInstallDir)PlatformSDKlib
And I get this:
Code:
c:orbiterorbitersdksamplesshuttlepbshuttlepb.cpp(45) : warning C4715: 'LiftCoeff' : not all control paths return a value
I though I fixed this...
The solution is in the compiler setup instructions at OrbiterWiki:
http://www.orbiterwiki.org/wiki/Free_Compiler_Setup#C.2B.2B_language_change
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Are you using the directories Heilor posted? In particular, this one:
Code:
$(VCInstallDir)PlatformSDKlib

Yes, I think so. But it still asks for odbc32.lib.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,439
Reaction score
689
Points
203
Yes, I think so. But it still asks for odbc32.lib.
Remove it from Linker>Additional Dependencies. Make sure the only dependencies are GDI32.lib, user32.lib and kernel32.lib.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Remove it from Linker>Additional Dependencies. Make sure the only dependencies are GDI32.lib, user32.lib and kernel32.lib.

Done that, but now it says it cannot find windows.h again...
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,439
Reaction score
689
Points
203
Where did you install VC++ and the Windows SDK to? Also which version of the Windows SDK did you install? I'm using the 2003 version.

My VC++ and Windows SDK installation is to C:\Program Files\ by default.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
Where did you install VC++ and the Windows SDK to? Also which version of the Windows SDK did you install? I'm using the 2003 version.

I don't quite know what SDK I installed, but I think I installed the right one. I think.

I have a number of possible directories:
Compiler:
C:\Program Files\Microsoft Visual Studio 9.0
C:\Program Files\Microsoft Visual Studio 8

SDK:
C:\Program Files\Microsoft Platform SDK
C:\Program Files\Microsoft Visual Studio .NET 2003
C:\Program Files\Microsoft SDKs

I'm thinking some directory is set wrong, somewhere. I just need to find it.
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
You have VS2008, why aren't you using it?

Also--have you tried completely uninstalling and then reinstalling VS (remove all VS and SDK components first, and then install ONE version) to fix the directories you broke?
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
You have VS2008, why aren't you using it?

Also--have you tried completely uninstalling and then reinstalling VS (remove all VS and SDK components first, and then install ONE version) to fix the directories you broke?

I have VS 2008?
Huh? :blink::huh:

How do I use it?

EDIT
I also originally tried reinstalling, but I don't want to try it again, because that download is pretty big.
 

escapetomsfate

OBSP Developer
Addon Developer
Joined
Jun 21, 2008
Messages
282
Reaction score
0
Points
0
Location
GB
T.Neo, are you on an operationg system that isn't windows XP/Vista? On Windows7 this would not work for me. I tried vista, did exactly the same includes etc, it works fine.
 

T.Neo

SA 2010 Soccermaniac
Addon Developer
Joined
Jun 22, 2008
Messages
6,368
Reaction score
0
Points
0
T.Neo, are you on an operationg system that isn't windows XP/Vista? On Windows7 this would not work for me. I tried vista, did exactly the same includes etc, it works fine.

I'm using XP.
 
Top