User forums > Using Code::Blocks

Issues in importing a MS Visual C++ .NET 2003 solution

(1/6) > >>

Michael:
Dear all,

I have tried to import the solution (MS Visual C++ .NET 2003) for the RakNet project and generally it works quite good. Anyway, there was issues that needed to be fixed to make CodeBlocks compiles the different projects.

First of all let me say that I have download the latest version of Codeblocks (patch). A first remark is that CodeBlocks still displays 1.0-RC1 and not 1.0-RC1-1. Is this normal?

Then I have set the Codeblocks to works with MS Visual C++ .NET 2003 compiler (free Toolkit) as default and set the necessary pathes. Anyway, where I have to set the bin pathes? In .NET there is an "Executables" folder where you can add bin pathes, but for CodeBlocks :?? Is may be the "resources" folder?

Finally, I have tried to compile to the different projects, one after the other. But here a first issue. The link directories and libraries were not imported correctly. For example, there was missing the extension ".lib", which made CodeBlocks search for a .obj file instead of a .lib. Fixed this problem, I could compile the projects. To be sure or quite that it was a problem (or a bad setting) of CodeBlocks, I have tried to compile each project with MS Visual C++ .NET 2003.

I have remarked the following:

(1) Some projects compile only under "release", but give a link error(s) under "debug". Strange  :?.
(2) Some projects refuse to compile in both "debug" and "release" (e.g., DLL). Mostly due to link errors.
(3) Some projects compile just fine :).

Are the above mentioned problems related to the import functionality of CodeBlocks (not yet finished), or I missed something?

Any idea, comment, help is highly appreciated.

Anyway, let me congratulate for the good work you are doing and hope you will continue improving CodeBlocks in the future.

Best wishes,
Michael

squizzz:

--- Quote from: Michael on August 08, 2005, 12:24:54 pm ---Then I have set the Codeblocks to works with MS Visual C++ .NET 2003 compiler (free Toolkit) as default and set the necessary pathes. Anyway, where I have to set the bin pathes? In .NET there is an "Executables" folder where you can add bin pathes, but for CodeBlocks :?? Is may be the "resources" folder?

--- End quote ---
C::B looks for executables either in "bin" subdirectory of Compiler's installation directory or any of "Extra paths". Both can be set under "Settings->Compiler->Programs".


--- Quote ---(1) Some projects compile only under "release", but give a link error(s) under "debug". Strange  Confused.
(2) Some projects refuse to compile in both "debug" and "release" (e.g., DLL). Mostly due to link errors.

--- End quote ---
Do they require resource compiler? If yes, don't forget there's no resource compiler in basic VC Toolkit 2003 bundle, you have to install Platform SDK to get one. (you will have to add Extra path to Platform SDK's "bin" directory or copy 'rc.exe' into VC Toolkit's "bin")

Michael:
Hello,

Thank you very much for the help.

I have already Microsoft Platform SDK installed (latest version). As you told me, I put the bin pathes to their right places (plus the RC.Exe and Cvtres.exe in the compiler bin folder) and now I can compile some more projects. Unfortunately, I still have problems to compile some projects under debug. Under release they compile just fine, but under debug they refuse to compile (link error(s). And quite strange one(s)).

The setting are the same for both release and debug and only changes some libraries. Very strange... :?.

Best wishes,
Michael

squizzz:

--- Quote from: Michael on August 08, 2005, 02:36:28 pm ---Under release they compile just fine, but under debug they refuse to compile (link error(s). And quite strange one(s)).
--- End quote ---
Could you post these errors, please?
Also tell (or post screenshots) what libraries you link to release version (which compiles succesfully) and debug version (which fails). Right click project, then "Build options", then "Linker options" tab.


Also, go to "Settings->Compiler" and click directories tab - do you have correct paths to Platform SDK "include" (compiler) and "lib" (linker) there? (C::B doesn't detect platform SDK installation...). Do you have resource compiler directory set under the last tab? Please check these ones.

Michael:
Hello,

I have checked the MS Platform SDK directories and despite the resource one, all are set correctly (if not I could not compile).

After adding the resource directory (which point to the C:\Programme\Microsoft Visual C++ Toolkit 2003\bin where the RC.Exe is), I have tried to re-compile a DLL project, but still getting link errors under debug. Here are the errors:

--------------------------------------------------------------------------------
Project   : RakVoiceDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Dokumente und Einstellungen\zum\Eigene Dateien\CodeBlocks_Projects\RakNetRakNet_v2.332\Lib\RakVoiceDLL\
--------------------------------------------------------------------------------
Switching to target: Debug
Linking dynamic library: Debug\..\..\RakVoiceDebug.dll
   Creating library Debug\..\..\RakVoiceDebug.lib and object Debug\..\..\RakVoiceDebug.exp
denoise.obj : error LNK2019: unresolved external symbol __ftol2 referenced in function _speex_preprocess
nb_celp.obj : error LNK2001: unresolved external symbol __ftol2
sb_celp.obj : error LNK2001: unresolved external symbol __ftol2
stereo.obj : error LNK2001: unresolved external symbol __ftol2
Debug\..\..\RakVoiceDebug.dll : fatal error LNK1120: 1 unresolved externals
Process terminated with status 1 (0 minutes, 5 seconds)
5 errors, 0 warnings
--------------------------------------------------------------------------------

Under release the compilation and linking was fine.

Concerning the libraries here they are:

Debug:
---------
Link libraries:
RakNetLibStaticDebug.lib
Other linker options:
/debug
/pdb:Debug\RakVoiceDLL.pdb

Release:
---------
Link libraries:
RakNetLibStatic.lib
Other linker options:
/debug
/INCREMENTAL:NO

Another project that fails under debug, but not under release is this one:

--------------------------------------------------------------------------------
Project   : Chat Example Server
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Dokumente und Einstellungen\zum\Eigene Dateien\CodeBlocks_Projects\RakNetRakNet_v2.332\Samples\Code Samples\Chat Example\
--------------------------------------------------------------------------------
Switching to target: Debug
Linking console executable: Debug\Chat Example Server.exe
LINK : fatal error LNK1104: cannot open file 'Example.obj'
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
--------------------------------------------------------------------------------

Concerning the libraries here they are:

Debug:
---------
Link libraries:
RakNetLibStaticDebug.lib
ws2_32.lib
Other linker options:
/debug
/pdb:Debug\Chat Example Server.pdb

Release:
---------
Link libraries:
RakNetLibStatic.lib
ws2_32.lib
Other linker options:
/debug
/INCREMENTAL:NO


The path of the directory to the libraries is the same for both release and debug.

I hope these small report could be of some help to detect the problem I have.

Could may be related to the "Other linker options"?

Thank you very much.

Best wishes,
Michael

Navigation

[0] Message Index

[#] Next page

Go to full version