VS2008: Fixing the Warning PDB ‘vc90.pdb’ not found

July 1, 2009 by Christian

Using separate build libraries lead to the following message of the Visual Studio 2008 linker:

warning LNK4099: PDB 'vc90.pdb' was not found with ...

The problem is that the object files embeds the path to the PDB file. The following steps extracts the object file from the library and shows the embedded path.

C:\>lib /list al.lib
Microsoft (R) Library Manager Version 9.00.30729.01
...
.\Debug\alIP_Winsock.obj
...

C:\>lib /extract:.\Debug\alIP_Winsock.obj al.lib
Microsoft (R) Library Manager Version 9.00.30729.01

C:\>dir *.obj
...
30.06.2009  13:53            48.195 alIP_Winsock.obj
...

C:\>dumpbin /section:.debug$T /rawdata  alIP_Winsock.obj
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
...
Dump of file alIP_Winsock.obj
...
RAW DATA #3E
00000000: 04 00 00 00 6E 00 15 15 D1 E3 36 F9 6E D3 E4 4E  ....n...Ñã6ùnÓäN
00000010: 92 D2 08 70 C2 43 72 F6 01 00 00 00 63 3A 5C 5F  .Ò.pÂCrö....c:\_
...
00000030: 6F 61 5C 63 6F 64 65 5C 64 70 77 73 63 6F 72 65  oa\code\dpwscore
00000040: 2D 32 2E 31 2E 30 5C 70 6C 61 74 66 6F 72 6D 5C  -2.1.0\platform\
00000050: 76 73 32 30 30 38 5C 77 69 6E 33 32 5C 61 6C 5C  vs2008\win32\al\
00000060: 61 6C 5C 64 65 62 75 67 5C 76 63 39 30 2E 70 64  al\debug\vc90.pd
00000070: 62 00 F2 F1                                      b.òñ
...

Fixing this problem is done by setting the Program Database File for the object file and the library to the same setting.

Here are the location in the VS2008 Project Properties:

Project Configuration Properties -> C/C++ -> Output Files
Program Database File

This name, e.g. $(IntDir)\vc90.pdb, is embedded into the object file and it should be the same as the one in

Project Configuration Properties -> Linker -> Debugging
Generate Program Database File

This is, e.g. $(TargetDir)$(TargetName).pdb

Now the object file contain the path where the library is located, too.

...
RAW DATA #3E
00000000: 04 00 00 00 56 00 15 15 3E 7B 32 F1 12 86 51 48  ....V...>{2ñ..QH
00000010: 97 34 6B AC 14 85 20 C2 01 00 00 00 63 3A 5C 5F  .4k¬.. Â....c:\_
...
00000030: 6F 61 5C 63 6F 64 65 5C 74 6F 6F 6C 73 5C 64 70  oa\code\tools\dp
00000040: 77 73 63 6F 72 65 62 75 69 6C 64 5C 64 65 62 75  wscorebuild\debu
00000050: 67 5C 61 6C 2E 70 64 62 00 F3 F2 F1              g\al.pdb.óòñ
...

Here are the Properties as used within a VS C++ Project file (.vcproj) or Property file (.vsprops):


Loading a Python module fails with the message “unknown symbol”

August 28, 2008 by Christian

Using the import statement of Python to load a self build module sometimes fails. In my personal experience most of the time the problem was due to unresolved symbols in my .so modules. For QNX and many other POSIX compatible systems like GNU/Linux Python uses dlopen to load the dynamic libraries aka modules.

Read the rest of this entry »

PyDev – One of my favorite plugins for Eclipse

August 28, 2008 by Christian

While programming in Python I use most of the time the Python perspective provided by the PyDev plug in for Eclipse. PyDev is the abbreviation of Python Development Environment and available from http://pydev.sourceforge.net/index.html. This post outlines the steps installing PyDev and the Python lint pylint.

Read the rest of this entry »

Debugger is failing to start with a time out

August 28, 2008 by Christian

In case you get only this information in the view of Eclipse or Momentics IDE named Debug:

Thread[0] 1 <symbol is not available>

The corresponding source is displayed as:

No source available for “”

[View Disassembly ...]

The launch of the target is terminated by a time out.

Read the rest of this entry »

TFPT reports: Unable to determine the workspace.

August 14, 2008 by Christian

Using TFPT from Microsoft Team Foundation PowerTools December 2006 with this or a similar command

> TFPT.exe /online

fails with the message

Unable to determine the workspace.

If this is the case for a workspace created with Visual Studio 2008 try to change the workspace from Visual Studio 2005. Even only changing the comment was sufficient in my case. After this change everything works again from TPFT and VS 2008, too.

Adding Mylyn and PyDev to QNX Momentics IDE

August 14, 2008 by Christian

A useful extension to Eclipse and therefore QNX Momentics is Mylyn (http://www.eclipse.org/mylyn/). It helps to organize your actual task in the perfect way. Give it a try!

To install it add for IDE 4.5 (Tau) the Eclipse 3.3 update site to Help->Software Updates->Find and install… . Select the radio button named “Search for new features to install” and click Next. Then it is possible to add a “New Remote Site…”.

For most distributions of Eclipse, there should already be a “Europa Discovery Site” defined in the Update Manager. Otherwise you can add the following URL as a remote update site in the update manager.

http://download.eclipse.org/releases/europa/

See Eclipse Help for general information about using Update Manager.

To get the latest version of Mylyn you may add the Mylyn update site, too. This is the necessary URL:

http://download.eclipse.org/tools/mylyn/update/e3.3

Next important extension is PyDev (http://pydev.sourceforge.net). This is the URL for the remote update site:

http://pydev.sourceforge.net/updates/


Often used pkgsrc commands

August 14, 2008 by Christian

This my memo where I store the commands I’m using when building packages with pkgsrc (http://www.netbsd.org/docs/software/packages.html).

Determining the package dependencies:
$ bmake show-depends-pkgpath

Finding build references to a given package, e.g. libdrm:
$ egrep ‘libdrm|xf86driproto’ */*/buildlink3.mk

All the available targets are documented in The pkgsrc make target reference – NetBSD Wiki.

This is used to rebuild a patched package:
bmake distinfo && bmake clean && bmake build

The following builds and install the package:
bmake distinfo && bmake clean && bmake package

QNX specific issues are discussed in the forum http://community.qnx.com/sf/discussion/do/listTopics/projects.pkgsrc/discussion.general.

Building libcURL for QNX 6.3.2 and Windows XP from source

August 14, 2008 by Christian

To have access on files using FTP, HTTP and directly from file system I use the free library libcurl. Another important aspect is portability as the application should work on QNX using qcc/gcc 4.2.3 and on Windows using VC9/VS2008. So I give libcurl a try. The build process for libcURL is as stated in the documentation very straight forward. But there where two little pitfalls discovered when using VS2008.

Read the rest of this entry »

Script fails with “No such file or directory”

July 9, 2008 by Christian

While running a script it fails immediately with “No such file or directory“. Even a print or echo command in the second line of the script is ignored. The used program to process the script does exist and is running, too. In this case checking the line endings may help:

file nameofthescript

will report:

ISO-8859 English text, with CRLF line terminators

but expected is:

ISO-8859 English text

The problem are the CR/LF line endings. These are typically used from MS Windows applications. Correct the line endings using any editor. For MS Windows try the Notepad++ open source editor. It has a build-in menu item to fix the line endings: Format -> Convert to Unix.

QNX Momentics IDE Tau – Eclipse 3.2 with CDT 4 – Installation on Windows XP

July 3, 2008 by Christian

This post is only a rough outline of installing a new IDE for QNX.

Download the Development Build of the IDE and the momentics-632-patch-for-profiler from

http://community.qnx.com/sf/frs/do/listReleases/projects.ide/frs.ide_integration_builds

Follow the instructions on the Wiki page Builds_Tau_Integration

And get a faster and more useful IDE for QNX.

I would suggest to give the IDE some more memory in the qde.ini file change -Xmx512M to -Xmx700M.

Another tweak would to rename the eclipse/jre directory. This way the qde.exe does not find the embedded JRE 5 but instead the one installed on your system. So it is possible to benefit from the speedup from Java 6. In case you get any trouble you can rename the directory back again and QDE will start the next time with the embedded Java VM.

Afterwards I’ve updated binutils and gcc, too. These are the download locations I used:

http://community.qnx.com/sf/frs/do/viewRelease/projects.toolchain/frs.binutils.binutils_2_18

http://community.qnx.com/sf/frs/do/viewRelease/projects.toolchain/frs.gcc.gcc_4_2

I follow the instructions at
http://community.qnx.com/sf/wiki/do/viewPage/projects.toolchain/wiki/Downloads_gcc4.2Preview

the obvious required change is to use 4.2.3 as the version number.

and later on:
http://community.qnx.com/sf/frs/do/viewRelease/projects.toolchain/frs.gdb.gdb_6_7_u8

I hope that you enjoy the IDE, too. Now I’m waiting for CDT 5.0 …