Code::Blocks Forums

User forums => Help => Topic started by: Muffin on November 05, 2005, 07:59:59 pm

Title: Linking Errors while Compiling Visual Studio 2003 Projects
Post by: Muffin on November 05, 2005, 07:59:59 pm
I followed the nice Visual Toolkit Integration Tutorial (http://wiki.codeblocks.org/index.php/Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE) and tried to compile Gammu (http://www.mwiacek.com/zips/gsm/gammu/test/gammu-1.03.07.tar.gz) a free GSM toolkit. Codeblocks 1.0 RC2 imports the .vcproj file without errors and compiles the units but in the end I always get linking errors. The developer uses the original Microsoft Visual Studio 2003 so he can not help me, can you?

Quote
Project   : gammudll
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : D:\gammu-1.03.07\win32\dll\msvc2003.mak\
--------------------------------------------------------------------------------
Switching to target: Release
Linking dynamic library: .\Release\gammu.dll
ser_w32.obj : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function _serial_open
ser_w32.obj : error LNK2019: unresolved external symbol __imp__RegEnumValueA@32 referenced in function _serial_open
ser_w32.obj : error LNK2019: unresolved external symbol __imp__RegOpenKeyExA@20 referenced in function _serial_open
.\Release\gammu.dll : fatal error LNK1120: 3 unresolved externals
Process terminated with status 1 (0 minutes, 0 seconds)
4 errors, 0 warnings
Title: Re: Linking Errors while Compiling Visual Studio 2003 Projects
Post by: mandrav on November 05, 2005, 08:28:13 pm
Just add advapi32.lib in link libraries (Project->Build options->Linker->Link libraries)
Title: Re: Linking Errors while Compiling Visual Studio 2003 Projects
Post by: Muffin on November 05, 2005, 08:49:29 pm
Quote
Switching to target: Release
Linking dynamic library: Gammu.dll
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings

Great thanks. You already answered (http://forums.codeblocks.org/index.php/topic,380.0.html) the same question, I am sorry. I searched for the wrong keywords.