User forums > Help

Code won't link using Microsoft Visual C++ 6

(1/5) > >>

JackDriver:
Hi,

I am new to code::blocks and am trying to get a simple "Hello World" project to work using Microsoft Visual Studio 6 on Windows XP. I have set the compiler & debugger setting correctly with VS6 as the default compiler, created the project as a console application and am using the supplied "Hello World" code.

The program is compiled correctly but doesn't link and reports "Nothing to be done". To find out why I put "Full command line" debugging ON which indicates that it is going to link but noting happens. Below is the log output

\Microsoft Visual Studio\VC98\Include\SYS" /I"C:\Program Files\Microsoft Visual Studio\VC98\ATL\Include" /I"C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include"  /c main.cpp /Foobj\Debug\main.obj
main.cpp

LINK.EXE /nologo /LIBPATH:"C:\Program Files\Microsoft Visual Studio\VC98\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio\VC98\MFC\Lib"  /out:bin\Debug\hello2.exe msvcrtd.lib msvcprtd.lib  obj\Debug\main.obj   /DEBUG
Nothing to be done.

If I copy and paste the link command into a command window the linker works and the .exe is produced and runs correctly.

I have also created same project using GNU CC compiler as the default and everything works fine, i.e. code is compiled and linked and runs OK.

Any suggestions as to how to solve this problem would be greatly appreciated as I hop to use CB to produce cross platform (Windows and Ubuntu) code.



Jenna:

--- Quote from: JackDriver on March 09, 2008, 10:48:06 pm ---Any suggestions as to how to solve this problem would be greatly appreciated as I hop to use CB to produce cross platform (Windows and Ubuntu) code.

--- End quote ---

No suggestions, because I don't use M$ Compilers on XP at the moment.

... but if you want to do cross platform developping, it would be much more comfortable to use gcc on both platforms.

JackDriver:
Yes, that would be nice. But to convince my work colleagues I want to be able to demonstrate that CB can work with just abount any compiler/linker combination (as it claims!).

Seronis:

--- Quote from: JackDriver on March 10, 2008, 12:36:07 am ---Yes, that would be nice. But to convince my work colleagues I want to be able to demonstrate that CB can work with just abount any compiler/linker combination (as it claims!).

--- End quote ---

In all fairness,  work colleagues would be using virtually anything but the VC6 compiler as it was released well prior to the standard being released (and has many known quirks).  Have you tried a more recent VC toolkit?  They are available for free from the microsoft website.

thomas:

--- Quote from: JackDriver on March 09, 2008, 10:48:06 pm ---\Microsoft Visual Studio\VC98\Include\SYS" /I"C:\Program Files\Microsoft Visual Studio\VC98\ATL\Include" /I"C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include"  /c main.cpp /Foobj\Debug\main.obj
--- End quote ---
This commandline looks like there's no compiler? Should it not read CC.EXE or MSVC.EXE or something as the first thing?

The linker looks good:

--- Quote ---LINK.EXE /nologo /LIBPATH:"C:\Program Files\Microsoft Visual Studio\VC98\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio\VC98\MFC\Lib"  /out:bin\Debug\hello2.exe msvcrtd.lib msvcprtd.lib  obj\Debug\main.obj   /DEBUG
--- End quote ---


I'd recomment looking under toolchain executables, if there is anything sensible set for the compiler at all (doesn't look like).

Navigation

[0] Message Index

[#] Next page

Go to full version