Author Topic: LNK1181  (Read 14254 times)

Corndog

  • Guest
LNK1181
« on: March 22, 2006, 12:16:38 am »
Hello.

After using rc2 for a while, I decided to download today's (March 21) nightly. Whenever I try to compile a project, it gives me a linker error--LNK1181. After searching the web and these forums, I found that it's probably something to do with the linker library paths. However, all the paths are correct (I think). They are absolute paths pointing to AdvAPI32.Lib, Gdi32.Lib, and User32.Lib all located in C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Lib\

There was another topic on the forums relating to this...I tried the suggestion mentioned there, and it didn't work.

Since you're probably going to ask all kinds of questions about my setup, I'll try to answer as many as I can now.

I'm using WinXP SP2, C::B Nightly Build from 3/21/06, VC++ Toolkit, and the SDK. I can't think of anything else, so feel free to ask!

Thanks.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: LNK1181
« Reply #1 on: March 22, 2006, 10:28:28 am »
Hello,

Did you enter the libraries you need in the linker?

Best wishes,
Michael

Corndog

  • Guest
Re: LNK1181
« Reply #2 on: March 22, 2006, 09:46:55 pm »
Yup. Gdi32, user32, and advapi32 libs in the linker tab, and the lib directories from the toolkit and SDK in the Directories/Linker tab.

Forgot to post the exact error message...here it is/

Code
-------------- Build: default in Corndog ---------------
Linking executable: corndog.exe
LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj'
Process terminated with status 1181 (0 minutes, 0 seconds)
1 errors, 0 warnings

I've looked in the target settings...the only mention of a .obj file is the output file. I can't find a input file setting anywhere.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: LNK1181
« Reply #3 on: March 22, 2006, 10:39:24 pm »
Looks like a spaces-in-path error.
Go to "Settings->Compiler & debugger->[select your compiler]->Other" and enable full logging. Then re-post your build log here.
Be patient!
This bug will be fixed soon...

Corndog

  • Guest
Re: LNK1181
« Reply #4 on: March 23, 2006, 03:53:15 am »
I thought for sure you guys got rid of that problem in rc2...

Anyways, I did have spaces in the VC++ Toolkit and SDK path. I moved the directories to c:/programming/ and took out the spaces. Now, when I try to compile, it just says that there is "nothing to be done".

Hmmm....I guess I didn't switch to full command line errors when I downloaded it. Sorry. Here's the new one, path's fixed.
Code
-------------- Build: default in Corndog ---------------
cl.exe /nologo /EHsc  /IC:\Programming\MicrosoftSDK\Include /IC:\Programming\VCToolkit\include /IC:\Programming\VCToolkit\include /IC:\Programming\MicrosoftSDK\Include  /c win_main.cpp /FoC:\Programming\corndog\.objs\win_main.obj
Execution of 'cl.exe /nologo /EHsc  /IC:\Programming\MicrosoftSDK\Include /IC:\Programming\VCToolkit\include /IC:\Programming\VCToolkit\include /IC:\Programming\MicrosoftSDK\Include  /c win_main.cpp /FoC:\Programming\corndog\.objs\win_main.obj' in 'C:\Programming\corndog' failed.
Nothing to be done.


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: LNK1181
« Reply #5 on: March 23, 2006, 08:38:08 am »
I thought for sure you guys got rid of that problem in rc2...

We did, but since then the build system has been changed a lot, so it's possible that a bug might have crept in (especially for non gcc compilers which I don't test that often).

Code
-------------- Build: default in Corndog ---------------
cl.exe /nologo /EHsc  /IC:\Programming\MicrosoftSDK\Include /IC:\Programming\VCToolkit\include /IC:\Programming\VCToolkit\include /IC:\Programming\MicrosoftSDK\Include  /c win_main.cpp /FoC:\Programming\corndog\.objs\win_main.obj
Execution of 'cl.exe /nologo /EHsc  /IC:\Programming\MicrosoftSDK\Include /IC:\Programming\VCToolkit\include /IC:\Programming\VCToolkit\include /IC:\Programming\MicrosoftSDK\Include  /c win_main.cpp /FoC:\Programming\corndog\.objs\win_main.obj' in 'C:\Programming\corndog' failed.
Nothing to be done.


Can't find cl.exe. Have you checked in the global compiler options, for the MS Toolkit compiler, if the master path is set correctly?
Be patient!
This bug will be fixed soon...

Corndog

  • Guest
Re: LNK1181
« Reply #6 on: March 23, 2006, 09:45:36 pm »
Ah. That was it. I had changed the path settings in the linker and directories tab to the one with no space. The programs tab, however, I kept in the dir with spaces.

Wow...I knew it had to be something simple. I suppose this was a waste of forum space...

Thanks!

BTW, C::B is really cool. It's nice to have dedicated and helpful developers and staff working on this who know what they're doing.