Author Topic: Problems linking with Visual Studio 2005 Professional  (Read 11444 times)

Offline Hideaki

  • Single posting newcomer
  • *
  • Posts: 3
Problems linking with Visual Studio 2005 Professional
« on: March 24, 2009, 03:21:44 am »
I'm having problems linking a simple program(and anything for that matter) with Code::Blocks using the Visual Studio 2005 Professional compiler.

This is the error I get:
Code
-------------- Build: Debug in test ---------------

main.cpp
Linking console executable: bin\Debug\test.exe
link: extra operand `/LIBPATH:C:\\Program Files\\Microsoft Visual Studio 8\\VC\\lib'
Try `link --help' for more information.
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

The same compile will work fine with Visual Studio 2008 Pro, but I'd like to use 2005 for a project I've already been working on.

Offline Hideaki

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problems linking with Visual Studio 2005 Professional
« Reply #1 on: March 24, 2009, 07:22:04 am »
Well, it turns out it has nothing to do with code::blocks but with the fact that I have cygwin in my path. Is there a reason why Code::Blocks is launching link.exe from the path instead of directly from the specified location?

I fixed this by specifying the full path to link.exe(C:\Program Files\Microsoft Visual Studio 8\VC\bin\link.exe) in Code::Block's compiler settings.
« Last Edit: March 24, 2009, 07:33:10 am by Hideaki »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Problems linking with Visual Studio 2005 Professional
« Reply #2 on: March 24, 2009, 07:27:55 am »
Which version of C::B do you use.

This issue (not respecting the path-order implied by settting the path in toolchain tab sometimes) should be fixed in svn r5344.

Offline Hideaki

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problems linking with Visual Studio 2005 Professional
« Reply #3 on: March 24, 2009, 07:34:04 am »
Which version of C::B do you use.

This issue (not respecting the path-order implied by settting the path in toolchain tab sometimes) should be fixed in svn r5344.


I'm using 8.02.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Problems linking with Visual Studio 2005 Professional
« Reply #4 on: March 24, 2009, 07:36:09 am »
Which version of C::B do you use.

This issue (not respecting the path-order implied by settting the path in toolchain tab sometimes) should be fixed in svn r5344.


I'm using 8.02.

In this case you should either update to a recent nightly build or wait for the next release to have this issue fixed.