User forums > Help
can't Integrate VC 2003 TOOLKIT with C::B
code_tin:
I have installed Microsoft Visual Toolkit 2003 and Platform SDK 2003 SP1,
and setting C::B like this
"Compiler" tab:
D:\Program Files\PlatformSDK\Include
D:\Program Files\CodeBlocks\Include
"Linker" tab:
D:\Program Files\PlatformSDK\Lib
D:\Program Files\CodeBlocks\Lib
"Resource compiler" tab:
D:\Program Files\PlatformSDK\Include
after this.i complied my code
but it still warn like this :
main.obj error LNK2019: unresolved external symbol __imp__RegOpenKeyA@12
i know that because link can't find the lib file
how to setting the C::B to include lib file?
thanks a lot.
MortenMacFly:
--- Quote from: code_tin on August 28, 2005, 10:27:08 am ---"Compiler" tab:
D:\Program Files\PlatformSDK\Include
D:\Program Files\CodeBlocks\Include
"Linker" tab:
D:\Program Files\PlatformSDK\Lib
D:\Program Files\CodeBlocks\Lib
"Resource compiler" tab:
D:\Program Files\PlatformSDK\Include
--- End quote ---
First of all: You are mixing compilers here: I assume you've installed Code::Blocks with MinGW (otherwise you would not have an include/lib folder there). You should not mix headers/libraries from Microsoft Platform SDK (D:\Program Files\PlatformSDK\Include) with those from MinGW (D:\Program Files\CodeBlocks\Include). So: Where is your Visual C++ installation? Or did you really install Visual C++ into the Code::Blocks-directory?
If you want to use Code::Blocks with Visual C++ only I suggest you install the compiler-free version. Otherwise make sure you setup the compiler correctly:
1.) Settings->Compiler, choose Visual C++
2.) Settings->Compiler->Visual C++, Directories for Compiler, Linker and Resource-Compiler (Visual C++ AND platform SDK in your case)
3.) Settings->Compiler->Visual C++, Programs -> Make sure you setup the root-path to VC++ here (not platform-SDK)
Furthermore IMHO one normally never installs compilers in a folder that contains spaces (but that's another story...)
Morten.
squizzz:
MortenMacFly is right,
--- Quote ---D:\Program Files\CodeBlocks\Include
D:\Program Files\CodeBlocks\Lib
--- End quote ---
These look suspicious... :) (do they point to VCTK instalation directory?)
--- Quote ---how to setting the C::B to include lib file?
--- End quote ---
- right click on your project, then click "Build Options"
- navigate to "Linker" tab
- add appropriate libraries (ones that you use) to the project using "Add" button
mandrav:
--- Quote from: code_tin on August 28, 2005, 10:27:08 am ---main.obj error LNK2019: unresolved external symbol __imp__RegOpenKeyA@12
--- End quote ---
All the other posters are right.
Still, the error you 're getting is probably because you haven't added a required library (I think it's advapi32.lib but don't take my word for it)...
Yiannis.
code_tin:
thanks all for answer my question.but ...
1. I have change the build option to VCTK 2003, so C::B will no longer use the MinGW's Include and Lib
2. my all programs are installed in D:\, so the VCTK Inlucde and Lib path are right.
3. I know this problem is cause by lake of LIB files,this is the problem that i want to ask.why i add SDK Lib path to C::B VCTK build path,but it looks like doesn't work... :( all API call's warning.
thanks..
Navigation
[0] Message Index
[#] Next page
Go to full version