Author Topic: Using C::B with MS Visual C++ 2008 Express  (Read 8139 times)

Offline eagleoneraptor

  • Single posting newcomer
  • *
  • Posts: 3
Using C::B with MS Visual C++ 2008 Express
« on: April 14, 2009, 09:39:58 pm »
Hi people, I had some problems to compile a simple console application with MS Visual C++ 2008 Express and C::B.

The Build log is the following:
Code
cl.exe /nologo /w  /DNDEBUG  /fp:precise /EHs /Ox /Zc:wchar_t /Zc:forScope   /I"C:\Archivos de programa\Microsoft Visual Studio 9.0\VC\include"  /c main.cpp /Foobj\main.obj
main.cpp
link.exe /nologo /LIBPATH:"C:\Archivos de programa\Microsoft Visual Studio 9.0\VC\lib"  /out:"obj\CodeBlocks y VS2005.exe"  obj\main.obj   
LINK : fatal error LNK1104: no se puede abrir el archivo 'kernel32.lib'
I look for kernel32.lib but this but this file not exist in "C:\Archivos de programa\Microsoft Visual Studio 9.0\VC\include"

Any idea?
Thanks!

Offline polygon7

  • Multiple posting newcomer
  • *
  • Posts: 104
    • Home site
Re: Using C::B with MS Visual C++ 2008 Express
« Reply #1 on: April 14, 2009, 11:06:32 pm »
Hi,
"kernel32.lib" should be in Platform SDK LIB directory (usually "c:\Program Files\Microsoft SDKs\Windows\<sdk version>\Lib").

« Last Edit: April 14, 2009, 11:08:30 pm by polygon7 »
best regards,
p7
 Free open source UML modeling tool: ArgoUML

Offline eagleoneraptor

  • Single posting newcomer
  • *
  • Posts: 3
Re: Using C::B with MS Visual C++ 2008 Express
« Reply #2 on: April 14, 2009, 11:57:16 pm »
Thanks man!
But I still with links problems when I try to compile a Win32 API GUI application, the console and standard application compile without problems.
I add the Lib and Include derectory of the Windows SDK to the compiler configuration, but nothing...

The linkers errors are about the API functions: CreateWindowEx, ShowWindow, etc.

Can any help? :)
Bye!

Offline polygon7

  • Multiple posting newcomer
  • *
  • Posts: 104
    • Home site
Re: Using C::B with MS Visual C++ 2008 Express
« Reply #3 on: April 15, 2009, 12:07:20 am »
Thanks man!
But I still with links problems when I try to compile a Win32 API GUI application, the console and standard application compile without problems.
I add the Lib and Include derectory of the Windows SDK to the compiler configuration, but nothing...

The linkers errors are about the API functions: CreateWindowEx, ShowWindow, etc.

Can any help? :)
Bye!

CreateWindowEx and ShowWindow functions are in user32.lib, use MSDN to find which functions are in kernel32.lib, user32.lib etc.
best regards,
p7
 Free open source UML modeling tool: ArgoUML

Offline eagleoneraptor

  • Single posting newcomer
  • *
  • Posts: 3
Re: Using C::B with MS Visual C++ 2008 Express
« Reply #4 on: April 15, 2009, 12:19:34 am »
Thanks again!!
I'm not include user32.lib to the linker because the accustoming to include the file implicitly.

Bye!
PD: Sorry about my english  :oops:

Offline davemaster

  • Single posting newcomer
  • *
  • Posts: 4
    • TeleTracking SAC
Re: Using C::B with MS Visual C++ 2008 Express
« Reply #5 on: June 03, 2009, 06:36:25 am »
Greetings,

check this location:

C:\Archivos de programa\Microsoft SDKs\Windows\v6.0A\Lib

In my case (visual c++ 2008 express - Windows XP SP2)

Then, as well as the functions you use in your code, you need to link some libraries. Add the location above to your compiler path lib search list: (codeblocks-menu->settings->compiler & debugger->search directories tab->linker.

Best regards.
David Elias Flores Escalante