C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 04-03-2009, 02:24 PM   #1
uh oh
 
Join Date: Jan 2005
Location: Ontario, CA
Posts: 66
Linker problem... no idea

I'm using VC2008, and currently my linker options look as follows under Properties:

Code:
/OUT:"C:\Documents and Settings\scott\My Documents\Visual Studio 2008\Projects\DynaTem\Debug\DTC.cgi" 
/INCREMENTAL /NOLOGO /MANIFEST /MANIFESTFILE:"Debug\DTC.cgi.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" 
/DEBUG /PDB:"C:\Documents and Settings\scott\My Documents\Visual Studio 2008\Projects\DynaTem\Debug\DTC.pdb" 
/SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT 
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib 
odbccp32.lib "..\debug\dynacgi.lib"
The dynacgi.lib file is located in $(SolutionDir)\Debug, and the project trying to include it is located in $(SolutionDir)\DTC. Now I have tried adding the full path to the linker options, however, the oddest part about it is I can't seem to find a way to get this option out of my linker... and strangest yet is how the compiler seems to be trying to add the library... the actual error is:

2>LINK : fatal error LNK1104: cannot open file '../../Debug/DynaCGI.lib'

Should the above path not be matching what is in the options? I even tried the #pragma comment(lib, "..\Debug\DynaCGI.lib") and I get the exact same error. Perhaps the #pragma is properly linking, but the linker itself is still trying to use the other (however it seemed to have obtained this 'path')?

Any help would be greatly appreciated as I really don't know why this is happening... and I've just spent the last two hours scouring through the Properties of my solution & projects as well as message boards for similar problems... have yet to find anything that would be any help whatsoever.

Thanks!

Last edited by cyreon; 04-03-2009 at 02:31 PM.
cyreon is offline   Reply With Quote
Old 04-03-2009, 02:51 PM   #2
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,381
Why are you manipulating the linker flags at all? If you simply add the DynaCGI project as a dependency of DTC, VS should figure this all out for you.

Select the DTC project, then go Menu->Project->Project Dependencies, find DynaCGI in the list and check the check box.
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot
brewbuck is offline   Reply With Quote
Old 04-03-2009, 02:53 PM   #3
uh oh
 
Join Date: Jan 2005
Location: Ontario, CA
Posts: 66
Its already done but, everytime (whether I try to add it manually or not) it attempts to add "../../debug/dynacgi.lib" and fails. I am simply troubleshooting the issue by attempting various methods to get it to link with the correct path instead of this one.

I also just tried wiping out everything but the project files and, all references to manual attempts have been removed, and I still am getting this same result. I may have to wipe out the solution and start it over, unless there are any other insights?

Update: Not sure why but, I did had to erase the entire projects and recreate them under a new solution. Reconfigure the solution and projects, as well as the project dependencies. Nothing was setup any different then the last time, however, now the linker was obsessed with the "false" path.

Last edited by cyreon; 04-03-2009 at 03:16 PM.
cyreon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linker problem with template traits/policy on MSVS 2005 MarkZWEERS C++ Programming 3 10-24-2008 04:01 AM
Linker Error problem 7smurfs C++ Programming 9 06-07-2005 10:28 AM
linker problem with mysql august_01 C++ Programming 1 04-24-2005 11:04 AM
half ADT (nested struct) problem... CyC|OpS C Programming 1 10-26-2002 08:37 AM
IDEA: Problem Solving Contests ygfperson Contests Board 8 10-19-2002 08:38 PM


All times are GMT -6. The time now is 12:55 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22