|
I've been trying to update a program written in VC++6.0 in to VC++ 2008. The VS2008 conversion went smoothly, leaving mostly errors resulting from the tighter type checking of VS2008.
This program uses a third party library which causes no problems in VC++6. It does, however, in VC++2008.
Here is the initial error;
fatal error C1083: Cannot open source file: 'FixTools.lib': No such file or directory c1xx DataStructures
The 'include' and 'library' directories are set correctly in the project properties and the file and directory permissions are correct.
Copying the FixTools.lib to the 'DataStructures' directory results in the following compile error;
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? d:\sacmannet\datastructures\fixtools.lib 7 DataStructures
Sound familiar to anyone?
Thanks,
- Dale
|
|
|
|
|
I'm wondering why you're getting compiler errors on a .lib file...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
So am I.
I'm rather new to Windows programming with C++. I've used Visual Basic since version 3.
My C++ experience has been limited to Linux OS utilities and console apps. I was dropped into the middle of this Windows C++ app six years after it's inception.
|
|
|
|
|
The .lib file is a library you want to link to your project, correct?
If so, there's a couple ways to add it to the project so it gets linked (not compiled):
1) Add the FixTools.lib file to the project Linker/Input/Additional Dependencies settings
2) Use #pragma comment(lib, "FixTools.lib") in a source (cpp) file
How have you included the library in your project?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for your quick response. I'm truly at a loss here, not that it takes that much to lose me in VC.
The software that contains the library file installed itself under the 'Program Files' directory. Per their instructions, I added the path to the lib file to the location in your #1. While checking, I noticed that the Additional Dependencies 'text' apparently didn't like the spaces in the path. I copied the file to the root of 'C' and corrected the path here and the options-Project and Solutions-VC++ Directories 'INCLUDE' & 'LIBRARY' settings.
The results are the same.
|
|
|
|
|
Dale Bourne wrote: the Additional Dependencies 'text' apparently didn't like the spaces in the path
In the additional dependencies linker settings section:
Pathnames with spaces should be surrounded by double quotes.
You can use relative or absolute paths.
Multiple pathnames should be separated by whitespace.
You should only get a linker error if it's wrong.
Somewhere else in your project there's some reference to the library
which is causing it to try to compile it....that's not good.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Somewhere else in your project there's some reference to the library
which is causing it to try to compile it....that's not good.
Thanks, I'll start digging.
|
|
|
|
|
Mark Salsbery wrote: Somewhere else in your project there's some reference to the library
which is causing it to try to compile it....that's not good.
Maybe a little background might help.
This solution, called Control Progam, consists of three projects(in compile order)...
AdoManRs
DataStructures
SacmanCP
DataStructures is dependent on AdoManRs
SacmanCP is dependent on DataStructures
OK, I grep'ed the entire directory structure for any reference to 'fixtools'. Nothing was found in the code.
It was found in:
DataStructures/DataStructures.dsp:52: # ADD LIB32 ..\AdoManRs\Release\AdoManRs.Lib FixTools.Lib WinMM.Lib dmacsdba.lib /nologo
DataStructures/DataStructures.dsp:67: # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ FixTools.lib /c
DataStructures/DataStructures.dsp:75: # ADD LIB32 ..\Bin\AdoManRs.lib FixTools.lib WinMM.lib dmacsdba.lib /nologo /DEBUGTYPE:COFF
DataStructures/DataStructures.vcproj:46: AdditionalOptions="FixTools.lib"
[from <configurations...><configuration>...<tool name="VCCLCompilerTool" ...=""> section]
SacmanCP/SacmanCP.vcproj:81: AdditionalDependencies="..\Bin\DataStructures.lib C:\FIXTOOLS50\LIB\dmacsdba.lib C:\FIXTOOLS50\LIB\FIXTOOLS.LIB"
SacmanCP/SacmanCP.vcproj:1592: RelativePath="..\Bin\fixtools.lib"
It is also listed under the SacmanCP resource files folder in the Solution Explorer.
I hope this means something to you. For the most part, it is greek to me.
My success with this program has been in tracing down a few bugs and making a few enhancements, all directly pertaining to the C++ language itself. As far as I am concerned, Visual Studio performs magic during the conversion process.
|
|
|
|
|
And possibly they said you're a Senior Developer on Windows platform...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I guess I 'fudged' my resume a little too much, huh!
|
|
|
|
|
My note wasn't about you...I was talking about marketing people! One of my previous company sold me (as consultant) as a C++ and Visual Basic expert, even if (at time) I never coded a single line using VB. Even worse they didn't tell me.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am currently writing an application using C++ and MFC. Please consider the following lines from a Window's RC file:
<br />
BEGIN<br />
POPUP "&File" {<br />
MENUITEM "&New", CALC_FILE_NEW<br />
MENUITEM "Add Account", ADD_ACCOUNT<br />
MENUITEM "Calculate", CALCULATE<br />
MENUITEM "Abort Calculation", ABORT_CALCULATION,GRAYED<br />
MENUITEM "&Exit", CALC_FILE_EXIT<br />
}<br />
.<br />
.<br />
.<br />
When the menu is displayed, I would expect the E in Exit to be underlined. However, it is not. I thought the & character was suppose to do this. What is the proper way for me to have the E underlined when the menu is displayed?
Thanks
Bob
|
|
|
|
|
Are File and New underlined?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
David,
Thanks for the response. The words File and New are not underlined when my menu is shown.
Bob
|
|
|
|
|
What if you press the Alt key?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
David,
If I press the alt key, then the first letter of each word in the top level menu becomes underlined. However, it does not affect the sub-menus. Is this to be expected?
Bob
|
|
|
|
|
BobInNJ wrote: However, it does not affect the sub-menus. Is this to be expected?
Windows itself seems to behave in the same fashion regardless of the setting on the Effects dialog box.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
There's a setting somewhere in Windows that manage how/when the menu mnemonic will be displayed.
(See display properties -> Appearance -> Effect)
See if that's working.
|
|
|
|
|
Thanks for the response. I could not find the Window's setting you described. Since other
menus are working properly (they come up underlined) I do not think the problem is with how I have
my Windows Operating System configured.
Any other ideas?
Bob
|
|
|
|
|
Press the ALT key...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
I am not sure what is going on, but all of a sudden the under line character is showing up.
Bob
|
|
|
|
|
Unusual sun spot activity?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What happens if you press the ALT key?
i.e. see (for instance) this page [^].
Also wonderful things would happen if I press the browser refresh button...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I would like to thank the group for their responses in this matter. Some how, it is now working. I do not understand why?
Bob
|
|
|
|
|
so I have a data stream I'm getting through on a GPIB that was supposed to be passed through using labview, we've since determined that this isn't possible so we need to do it via C since that is what the hardware likes. the problem is that I don't know how to take the data stream I'm getting in and simply just have it output to the serial port and most of my searches haven't yielded answers.
thank you
|
|
|
|